return 0;
}
-__attribute__((disable_sanitizer_instrumentation)) void
+// Required for dyld macOS 12.0+
+#if (__APPLE__)
+__attribute__((weak))
+#endif
+__attribute__((disable_sanitizer_instrumentation))
+extern "C" void
__tsan_on_report(void *report) {
const char *type;
void *addr;
unsigned long trace_size);
}
+// Required for dyld macOS 12.0+
+#if (__APPLE__)
+__attribute__((weak))
+#endif
__attribute__((disable_sanitizer_instrumentation))
-void __tsan_on_report(void *report) {
+extern "C" void
+__tsan_on_report(void *report) {
fprintf(stderr, "__tsan_on_report(%p)\n", report);
int tid;
fprintf(stderr, "Done.\n");
}
-__attribute__((disable_sanitizer_instrumentation)) void
+// Required for dyld macOS 12.0+
+#if (__APPLE__)
+__attribute__((weak))
+#endif
+__attribute__((disable_sanitizer_instrumentation))
+extern "C" void
__tsan_on_report(void *report) {
fprintf(stderr, "__tsan_on_report(%p)\n", report);
fprintf(stderr, "__tsan_get_current_report() = %p\n",
h++;
}
+// Required for dyld macOS 12.0+
+#if (__APPLE__)
+__attribute__((weak))
+#endif
__attribute__((disable_sanitizer_instrumentation))
-void __tsan_on_report() {
+extern void
+__tsan_on_report() {
fprintf(stderr, "Report.\n");
// Without these annotations this test deadlocks for COMPILER_RT_DEBUG=ON