commit | 5adee12900973c84196fe9e8ed056da6241a0f5f | [log] [tgz] |
---|---|---|
author | sergiuferentz <sergiuferentz@google.com> | Mon Jun 26 18:01:47 2023 +0000 |
committer | Fairphone ODM <fairphone-odm@localhost> | Mon Sep 25 15:05:16 2023 +0800 |
tree | b439d3fa6f20b601e0ef0ca664ea11fc2c931ea3 | |
parent | 5d34cd82733523fef03718705d4b6c2204db16bb [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:24a7874bb4093a1a6721a2002569512c43af5bdc) Merged-In: I4d1d2d4658b575bf2c8f425f91f68f03114ad029 Change-Id: I4d1d2d4658b575bf2c8f425f91f68f03114ad029 (cherry picked from commit 09cc1821c98f5da7acfb35f855a98b5513c9efa1)