Loading libs/binder/rust/tests/parcel_fuzzer/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -21,5 +21,7 @@ rust_fuzz { "waghpawan@google.com", "smoreland@google.com", ], // hotlist "AIDL fuzzers bugs" on buganizer hotlists: ["4637097"], }, } libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,7 @@ rust_fuzz { "waghpawan@google.com", "smoreland@google.com", ], // hotlist "AIDL fuzzers bugs" on buganizer hotlists: ["4637097"], }, } libs/gui/SurfaceComposerClient.cpp +21 −12 Original line number Diff line number Diff line Loading @@ -982,14 +982,16 @@ void SurfaceComposerClient::Transaction::cacheBuffers() { class SyncCallback { public: static void function(void* callbackContext, nsecs_t /* latchTime */, static auto getCallback(std::shared_ptr<SyncCallback>& callbackContext) { return [callbackContext](void* /* unused context */, nsecs_t /* latchTime */, const sp<Fence>& /* presentFence */, const std::vector<SurfaceControlStats>& /* stats */) { if (!callbackContext) { ALOGE("failed to get callback context for SyncCallback"); return; } SyncCallback* helper = static_cast<SyncCallback*>(callbackContext); LOG_ALWAYS_FATAL_IF(sem_post(&helper->mSemaphore), "sem_post failed"); LOG_ALWAYS_FATAL_IF(sem_post(&callbackContext->mSemaphore), "sem_post failed"); }; } ~SyncCallback() { if (mInitialized) { Loading Loading @@ -1024,10 +1026,11 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay return mStatus; } SyncCallback syncCallback; std::shared_ptr<SyncCallback> syncCallback = std::make_shared<SyncCallback>(); if (synchronous) { syncCallback.init(); addTransactionCommittedCallback(syncCallback.function, syncCallback.getContext()); syncCallback->init(); addTransactionCommittedCallback(SyncCallback::getCallback(syncCallback), /*callbackContext=*/nullptr); } bool hasListenerCallbacks = !mListenerCallbacks.empty(); Loading Loading @@ -1103,7 +1106,7 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay clear(); if (synchronous) { syncCallback.wait(); syncCallback->wait(); } mStatus = NO_ERROR; Loading Loading @@ -2155,6 +2158,12 @@ void SurfaceComposerClient::dispose() { mStatus = NO_INIT; } status_t SurfaceComposerClient::bootFinished() { sp<gui::ISurfaceComposer> sf(ComposerServiceAIDL::getComposerService()); binder::Status status = sf->bootFinished(); return statusTFromBinderStatus(status); } sp<SurfaceControl> SurfaceComposerClient::createSurface(const String8& name, uint32_t w, uint32_t h, PixelFormat format, int32_t flags, const sp<IBinder>& parentHandle, Loading libs/gui/aidl/android/gui/ISurfaceComposer.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,6 @@ interface ISurfaceComposer { * Signal that we're done booting. * Requires ACCESS_SURFACE_FLINGER permission */ // Note this must be the 1st method, so IBinder::FIRST_CALL_TRANSACTION // is assigned, as it is called from Java by ActivityManagerService. void bootFinished(); /** Loading libs/gui/include/gui/SurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ public: status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient, void* cookie = nullptr, uint32_t flags = 0); // Notify the SurfaceComposerClient that the boot procedure has completed static status_t bootFinished(); // Get transactional state of given display. static status_t getDisplayState(const sp<IBinder>& display, ui::DisplayState*); Loading Loading
libs/binder/rust/tests/parcel_fuzzer/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -21,5 +21,7 @@ rust_fuzz { "waghpawan@google.com", "smoreland@google.com", ], // hotlist "AIDL fuzzers bugs" on buganizer hotlists: ["4637097"], }, }
libs/binder/rust/tests/parcel_fuzzer/random_parcel/fuzz_service_test/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,7 @@ rust_fuzz { "waghpawan@google.com", "smoreland@google.com", ], // hotlist "AIDL fuzzers bugs" on buganizer hotlists: ["4637097"], }, }
libs/gui/SurfaceComposerClient.cpp +21 −12 Original line number Diff line number Diff line Loading @@ -982,14 +982,16 @@ void SurfaceComposerClient::Transaction::cacheBuffers() { class SyncCallback { public: static void function(void* callbackContext, nsecs_t /* latchTime */, static auto getCallback(std::shared_ptr<SyncCallback>& callbackContext) { return [callbackContext](void* /* unused context */, nsecs_t /* latchTime */, const sp<Fence>& /* presentFence */, const std::vector<SurfaceControlStats>& /* stats */) { if (!callbackContext) { ALOGE("failed to get callback context for SyncCallback"); return; } SyncCallback* helper = static_cast<SyncCallback*>(callbackContext); LOG_ALWAYS_FATAL_IF(sem_post(&helper->mSemaphore), "sem_post failed"); LOG_ALWAYS_FATAL_IF(sem_post(&callbackContext->mSemaphore), "sem_post failed"); }; } ~SyncCallback() { if (mInitialized) { Loading Loading @@ -1024,10 +1026,11 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay return mStatus; } SyncCallback syncCallback; std::shared_ptr<SyncCallback> syncCallback = std::make_shared<SyncCallback>(); if (synchronous) { syncCallback.init(); addTransactionCommittedCallback(syncCallback.function, syncCallback.getContext()); syncCallback->init(); addTransactionCommittedCallback(SyncCallback::getCallback(syncCallback), /*callbackContext=*/nullptr); } bool hasListenerCallbacks = !mListenerCallbacks.empty(); Loading Loading @@ -1103,7 +1106,7 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay clear(); if (synchronous) { syncCallback.wait(); syncCallback->wait(); } mStatus = NO_ERROR; Loading Loading @@ -2155,6 +2158,12 @@ void SurfaceComposerClient::dispose() { mStatus = NO_INIT; } status_t SurfaceComposerClient::bootFinished() { sp<gui::ISurfaceComposer> sf(ComposerServiceAIDL::getComposerService()); binder::Status status = sf->bootFinished(); return statusTFromBinderStatus(status); } sp<SurfaceControl> SurfaceComposerClient::createSurface(const String8& name, uint32_t w, uint32_t h, PixelFormat format, int32_t flags, const sp<IBinder>& parentHandle, Loading
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -62,8 +62,6 @@ interface ISurfaceComposer { * Signal that we're done booting. * Requires ACCESS_SURFACE_FLINGER permission */ // Note this must be the 1st method, so IBinder::FIRST_CALL_TRANSACTION // is assigned, as it is called from Java by ActivityManagerService. void bootFinished(); /** Loading
libs/gui/include/gui/SurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,9 @@ public: status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient, void* cookie = nullptr, uint32_t flags = 0); // Notify the SurfaceComposerClient that the boot procedure has completed static status_t bootFinished(); // Get transactional state of given display. static status_t getDisplayState(const sp<IBinder>& display, ui::DisplayState*); Loading