Skip to content

Commit cea1b79

Browse files
Blue GastonBlue Gaston
Blue Gaston
authored and
Blue Gaston
committed
[TSan][Darwin] Additional TSAN test requiring weak symbol for dyld64
Tests require a weak symbol for dyld weak-def coalescing. Differential Revision: https://reviews.llvm.org/D130732 Adding additional weak attribute
1 parent 2c82a12 commit cea1b79

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

compiler-rt/test/tsan/cxa_guard_acquire.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44

55
namespace __tsan {
66

7+
#if (__APPLE__)
8+
__attribute__((weak))
9+
#endif
710
void OnPotentiallyBlockingRegionBegin() {
811
printf("Enter __cxa_guard_acquire\n");
912
}
1013

14+
#if (__APPLE__)
15+
__attribute__((weak))
16+
#endif
1117
void OnPotentiallyBlockingRegionEnd() { printf("Exit __cxa_guard_acquire\n"); }
1218

1319
} // namespace __tsan

compiler-rt/test/tsan/default_options.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#include <pthread.h>
33
#include <stdio.h>
44

5+
#if (__APPLE__)
6+
__attribute__((weak))
7+
#endif
58
extern "C" const char *__tsan_default_options() {
69
return "report_bugs=0";
710
}

0 commit comments

Comments
 (0)