summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author sergiuferentz <sergiuferentz@google.com> 2023-06-26 18:01:47 +0000
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2023-08-22 02:14:28 +0000
commite562203ac243bf9d64bd33c922fc28e781a642fb (patch)
treeb561209552d436df7a513639d4e97d29cde865da /libs/gui/ConsumerBase.cpp
parent2135f6ba5d3afd6857fdd89fabf2f5605d97793c (diff)
Fix for heap-use-after-free in GPUService.cpp
This adds a unit test and fix for the bug reported by libfuzzer. Changes made: * Expose GPUService as testable code. * Update main_gpuservice.cpp to use the new GpuService now located at gpuservice/GpuService.h * Make initializer threads members of GpuService * Join the threads in destructor to prevent heap-use-after-free. * Add unit test that waits 3 seconds after deallocation to ensure no wrong access is made. Bug: 282919145 Test: Added unit test and ran on device with ASAN (cherry picked from commit 3c00cbc0f119c3f59325aa6d5061529feb58462b) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a8186037a730699b53e49de7241280c7532e5fc4) Merged-In: I4d1d2d4658b575bf2c8f425f91f68f03114ad029 Change-Id: I4d1d2d4658b575bf2c8f425f91f68f03114ad029
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions