File tree 2 files changed +10
-3
lines changed
test/sanitizer_common/TestCases/Posix
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 17
17
#include " sanitizer_common/sanitizer_common.h"
18
18
#include " sanitizer_common/sanitizer_errno.h"
19
19
#include " sanitizer_common/sanitizer_placement_new.h"
20
+ #include " sanitizer_common/sanitizer_stackdepot.h"
20
21
#include " tsan_flags.h"
21
22
#include " tsan_interface.h"
22
23
#include " tsan_report.h"
@@ -119,9 +120,18 @@ ScopedGlobalProcessor::~ScopedGlobalProcessor() {
119
120
void AllocatorLockBeforeFork () SANITIZER_NO_THREAD_SAFETY_ANALYSIS {
120
121
global_proc ()->internal_alloc_mtx .Lock ();
121
122
InternalAllocatorLock ();
123
+ #if !SANITIZER_APPLE
124
+ // OS X allocates from hooks, see 6a3958247a.
125
+ allocator ()->ForceLock ();
126
+ StackDepotLockBeforeFork ();
127
+ #endif
122
128
}
123
129
124
130
void AllocatorUnlockAfterFork (bool child) SANITIZER_NO_THREAD_SAFETY_ANALYSIS {
131
+ #if !SANITIZER_APPLE
132
+ StackDepotUnlockAfterFork (child);
133
+ allocator ()->ForceUnlock ();
134
+ #endif
125
135
InternalAllocatorUnlock ();
126
136
global_proc ()->internal_alloc_mtx .Unlock ();
127
137
}
Original file line number Diff line number Diff line change 6
6
// FIXME: It probably hangs on this platform.
7
7
// UNSUPPORTED: ppc
8
8
9
- // FIXME: TSAN does not lock allocator.
10
- // UNSUPPORTED: tsan
11
-
12
9
// FIXME: False stack overflow report
13
10
// UNSUPPORTED: android && asan
14
11
You can’t perform that action at this time.
0 commit comments