[scudo] Lock FallbackTSD before draining it am: 76dac14491 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/scudo/+/23184464 Change-Id: Ic9a39eb1692a36fec5ca5f3871bb8707d3f3f431 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/standalone/tsd_exclusive.h b/standalone/tsd_exclusive.h index 9d03773..2383674 100644 --- a/standalone/tsd_exclusive.h +++ b/standalone/tsd_exclusive.h
@@ -63,7 +63,9 @@ // We don't have a way to iterate all thread local `ThreadTSD`s. Simply // drain the `ThreadTSD` of current thread and `FallbackTSD`. Instance->drainCache(&ThreadTSD); + FallbackTSD.lock(); Instance->drainCache(&FallbackTSD); + FallbackTSD.unlock(); } ALWAYS_INLINE void initThreadMaybe(Allocator *Instance, bool MinimalInit) {