summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Daniele Di Proietto <ddiproietto@google.com> 2023-11-10 12:42:31 +0000
committer Daniele Di Proietto <ddiproietto@google.com> 2023-11-10 13:03:57 +0000
commit42e79138c0bfb0ac31bed572c3cedaab18e6e6f8 (patch)
treed46608939d3a4e027854e0e769ac25923c8ec674 /services/surfaceflinger/RegionSamplingThread.cpp
parentfed5eb68dc9deccabc0a0f9f712d01527dc4f433 (diff)
FenceTime: Fix undefined behavior
std::unordered_map::erase() invalidates iterators to the erased elements. Using erase() inside a range based for loop can lead to undefined behavior, because the loop holds the same iterator that are invalidated. Fix the problem by using an interator directly and incrementng only when it makes sense. This was found by surfaceflinger_frametracer_fuzzer running with asan (not hwasan!). TESTED=only fuzzer Bug: 307601836 Change-Id: Id99feaec21300dbd55d35acba67801b2483dd144
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions