forked from OSchip/llvm-project
[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
This commit is contained in:
parent
2c82a126d7
commit
cea1b790f6
|
@ -4,10 +4,16 @@
|
|||
|
||||
namespace __tsan {
|
||||
|
||||
#if (__APPLE__)
|
||||
__attribute__((weak))
|
||||
#endif
|
||||
void OnPotentiallyBlockingRegionBegin() {
|
||||
printf("Enter __cxa_guard_acquire\n");
|
||||
}
|
||||
|
||||
#if (__APPLE__)
|
||||
__attribute__((weak))
|
||||
#endif
|
||||
void OnPotentiallyBlockingRegionEnd() { printf("Exit __cxa_guard_acquire\n"); }
|
||||
|
||||
} // namespace __tsan
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if (__APPLE__)
|
||||
__attribute__((weak))
|
||||
#endif
|
||||
extern "C" const char *__tsan_default_options() {
|
||||
return "report_bugs=0";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue