summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-09-03 12:27:16 +0800
committer Riddle Hsu <riddlehsu@google.com> 2024-09-03 12:27:16 +0800
commit3a0f2df312cedfbc60bffd2f14b3123d11726168 (patch)
treeab063d9f3cc56ef341c2f5fcb37411e5c0a2472a /libs/androidfw/StringPool.cpp
parent2f4e0476d0c690f7a5cb47c72cf61c03d6daf7fa (diff)
Avoid potential NPE by accessing ActivityRecord on logger thread
The r.getPid() is "return app != null ? app.getPid() : 0;". If it is not in lock, the field "app" could be cleared by other thread, which causes NPE on "app.getPid()". Also change other log field to use info snapshot which is thread safe. Fix: 364131071 Flag: EXEMPT bugfix Test: atest ActivityMetricsLaunchObserverTests#testLaunchState Change-Id: I0249c72fefffcba8589bb79135484e7b050f61f8
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions