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

Skip to content
Commit c6e64010 authored by Rucha Katakwar's avatar Rucha Katakwar
Browse files

Camera: Fix for HWAddressSanitizer tag mismatch.

In ACameraManager when binderDied is executed, iteration happens over
the mDeviceStatusMap to get the cameraId. This same map gets modified
in onStatusChangedLocked and also sometimes deleting the cameraId entry
if the new status is NOT_PRESENT. This causes crash while accessing
memory just deleted.
This change creates a list of cameraId which is then used during the
iteration in binderDied.

bug: 194808760

Test:
1.Run NativeCameraDeviceTest#testCameraDeviceOpenAndClose and kill
cameraserver process to trigger binderDied.Verified the logs that
cameraId is passed to onStatusChangedLock.
2.Camera cts test suite currently in progress on device.

Change-Id: Ib885941e0d0ca7c25d2172f6e1314bb7bef451b7
parent 32b969b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment