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

Commit 5e9bccbc authored by Steven Moreland's avatar Steven Moreland
Browse files

binder_bpBinderFuzz: log socket unlink failure

A spurious, rare failure in this fuzzer can be
disambiguated by knowing if unlink fails.

Fixes: 346502426
Test: run binder_bpBinderFuzz
Change-Id: Idf5d884537a004c6308bc905c166f4949c31bd74
parent ec1272d0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    FuzzedDataProvider fdp(data, size);

    std::string addr = std::string(getenv("TMPDIR") ?: "/tmp") + "/binderRpcBenchmark";
    (void)unlink(addr.c_str());
    if (0 != unlink(addr.c_str()) && errno != ENOENT) {
        LOG(WARNING) << "Could not unlink: " << strerror(errno);
    }

    sp<RpcServer> server = RpcServer::make();