@@ -22,7 +22,6 @@ namespace __sanitizer {
22
22
#if (SANITIZER_LINUX || SANITIZER_NETBSD) && !SANITIZER_GO
23
23
// Weak default implementation for when sanitizer_stackdepot is not linked in.
24
24
SANITIZER_WEAK_ATTRIBUTE StackDepotStats StackDepotGetStats () { return {}; }
25
- SANITIZER_WEAK_ATTRIBUTE void StackDepotStopBackgroundThread () {}
26
25
27
26
void *BackgroundThread (void *arg) {
28
27
VPrintf (1 , " %s: Started BackgroundThread\n " , SanitizerToolName);
@@ -200,13 +199,22 @@ void ProtectGap(uptr addr, uptr size, uptr zero_base_shadow_start,
200
199
201
200
#endif // !SANITIZER_FUCHSIA
202
201
202
+ #if !SANITIZER_WINDOWS && !SANITIZER_GO
203
+ // Weak default implementation for when sanitizer_stackdepot is not linked in.
204
+ SANITIZER_WEAK_ATTRIBUTE void StackDepotStopBackgroundThread () {}
205
+ static void StopStackDepotBackgroundThread () {
206
+ StackDepotStopBackgroundThread ();
207
+ }
208
+ #else
209
+ // SANITIZER_WEAK_ATTRIBUTE is unsupported.
210
+ static void StopStackDepotBackgroundThread () {}
211
+ #endif
212
+
203
213
} // namespace __sanitizer
204
214
205
215
SANITIZER_INTERFACE_WEAK_DEF (void , __sanitizer_sandbox_on_notify,
206
216
__sanitizer_sandbox_arguments *args) {
207
- #if (SANITIZER_LINUX || SANITIZER_NETBSD) && !SANITIZER_GO
208
- __sanitizer::StackDepotStopBackgroundThread ();
209
- #endif
217
+ __sanitizer::StopStackDepotBackgroundThread ();
210
218
__sanitizer::PlatformPrepareForSandboxing (args);
211
219
if (__sanitizer::sandboxing_callback)
212
220
__sanitizer::sandboxing_callback ();
0 commit comments