[scudo] Calling getStats requires holding lock
authorChia-hung Duan <chiahungduan@google.com>
Thu, 19 Jan 2023 17:52:12 +0000 (17:52 +0000)
committerChia-hung Duan <chiahungduan@google.com>
Mon, 13 Feb 2023 23:09:47 +0000 (23:09 +0000)
commit70758b801df9b76b8200ae6f22cab44554545693
tree577fb73a987dd509a3db70e13a8f19121357b302
parentf28c1a9df2e3a940fa72c2890a965cbbe2433967
[scudo] Calling getStats requires holding lock

We didn't acquire the mutex while accessing those lock protected data,
this CL fixes it and now we don't need to disable the allocator while
reading its states.

Differential Revision: https://reviews.llvm.org/D142149
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/lib/scudo/standalone/primary32.h
compiler-rt/lib/scudo/standalone/primary64.h
compiler-rt/lib/scudo/standalone/quarantine.h
compiler-rt/lib/scudo/standalone/secondary.h