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

Commit ff4ed160 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder fuzzService: can't start threadpool" am: 11247a1b am:...

Merge "libbinder fuzzService: can't start threadpool" am: 11247a1b am: efb2c924 am: 6c8dcf6d am: 90f9a264 am: d998754b

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2192109



Change-Id: I75c610cd1b25db4ff7cbf629e4eb7ab96b6a8248
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e5b98209 d998754b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@

#include <fuzzbinder/random_parcel.h>

#include <android-base/logging.h>
#include <binder/ProcessState.h>

namespace android {

void fuzzService(const sp<IBinder>& binder, FuzzedDataProvider&& provider) {
@@ -60,6 +63,15 @@ void fuzzService(const sp<IBinder>& binder, FuzzedDataProvider&& provider) {
            options.extraFds.push_back(base::unique_fd(dup(retFds[i])));
        }
    }

    // invariants

    auto ps = ProcessState::selfOrNull();
    if (ps) {
        CHECK_EQ(0, ps->getThreadPoolMaxTotalThreadCount())
                << "Binder threadpool should not be started by fuzzer because coverage can only "
                   "cover in-process calls.";
    }
}

} // namespace android