File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,15 @@ extern (C) void thread_joinAll();
70
70
extern (C ) UnitTestResult runModuleUnitTests();
71
71
extern (C ) void _d_initMonoTime() @nogc nothrow ;
72
72
73
+ version (SupportSanitizers)
74
+ {
75
+ import ldc.attributes;
76
+
77
+ @weak extern (C ) void __rtsan_disable() @nogc nothrow {}
78
+ @weak extern (C ) void __rtsan_enable() @nogc nothrow {}
79
+ @weak extern (C ) void __rtsan_notify_blocking_call(const char * name) @nogc nothrow {}
80
+ }
81
+
73
82
version (CRuntime_Microsoft )
74
83
{
75
84
extern (C ) void init_msvc();
@@ -103,6 +112,12 @@ private shared size_t _initCount;
103
112
*/
104
113
extern (C ) int rt_init()
105
114
{
115
+ version (SupportSanitizers)
116
+ {
117
+ __rtsan_notify_blocking_call(" rt_init" );
118
+ __rtsan_disable();
119
+ scope (exit) __rtsan_enable();
120
+ }
106
121
/* @@BUG 11380 @@ Need to synchronize rt_init/rt_term calls for
107
122
version (Shared) druntime, because multiple C threads might
108
123
initialize different D libraries without knowing about the
You can’t perform that action at this time.
0 commit comments