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
Loading
Please register or sign in to comment