Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e339cf4e authored by Steven Moreland's avatar Steven Moreland
Browse files

binder random fd: always nonblock

blocking sockets can cause the fuzzer to hang. While
we'd like to fix these issues, they're of secondary
importance, so forcing nonblock here for now.

Bug: 236812909
Test: servicemanager_fuzzer
Change-Id: Ic7ee9cd185c448a227fd23a916dd94feb05f735a
parent ecf37287
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ std::vector<unique_fd> getRandomFds(FuzzedDataProvider* provider) {

                 int flags = O_CLOEXEC;
                 if (provider->ConsumeBool()) flags |= O_DIRECT;
                 if (provider->ConsumeBool()) flags |= O_NONBLOCK;

                 // TODO(b/236812909): also test blocking
                 if (true) flags |= O_NONBLOCK;

                 CHECK_EQ(0, pipe2(pipefds, flags)) << flags;