File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
test/sanitizer_common/TestCases/Posix Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1717#include " sanitizer_common/sanitizer_common.h"
1818#include " sanitizer_common/sanitizer_errno.h"
1919#include " sanitizer_common/sanitizer_placement_new.h"
20+ #include " sanitizer_common/sanitizer_stackdepot.h"
2021#include " tsan_flags.h"
2122#include " tsan_interface.h"
2223#include " tsan_report.h"
@@ -119,9 +120,18 @@ ScopedGlobalProcessor::~ScopedGlobalProcessor() {
119120void AllocatorLockBeforeFork () SANITIZER_NO_THREAD_SAFETY_ANALYSIS {
120121 global_proc ()->internal_alloc_mtx .Lock ();
121122 InternalAllocatorLock ();
123+ #if !SANITIZER_APPLE
124+ // OS X allocates from hooks, see 6a3958247a.
125+ allocator ()->ForceLock ();
126+ StackDepotLockBeforeFork ();
127+ #endif
122128}
123129
124130void AllocatorUnlockAfterFork (bool child) SANITIZER_NO_THREAD_SAFETY_ANALYSIS {
131+ #if !SANITIZER_APPLE
132+ StackDepotUnlockAfterFork (child);
133+ allocator ()->ForceUnlock ();
134+ #endif
125135 InternalAllocatorUnlock ();
126136 global_proc ()->internal_alloc_mtx .Unlock ();
127137}
Original file line number Diff line number Diff line change 66// FIXME: It probably hangs on this platform.
77// UNSUPPORTED: ppc
88
9- // FIXME: TSAN does not lock allocator.
10- // UNSUPPORTED: tsan
11-
129// FIXME: False stack overflow report
1310// UNSUPPORTED: android && asan
1411
You can’t perform that action at this time.
0 commit comments