diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2018-06-08 13:50:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 13:50:50 -0700 |
commit | f7c053e0045dee464978960c5da198c0302896e6 (patch) | |
tree | 678cf6e243864a7b9cf02dfcc604c3b0da86ae94 /Firebase | |
parent | d13a51abace9e1510ae953079f98e7b1390b128b (diff) |
Disable sanitizer race condition error (#1390)
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Core/FIRLogger.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Firebase/Core/FIRLogger.m b/Firebase/Core/FIRLogger.m index 7abac19..03f8a79 100644 --- a/Firebase/Core/FIRLogger.m +++ b/Firebase/Core/FIRLogger.m @@ -174,7 +174,14 @@ void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel) { }); } -BOOL FIRIsLoggableLevel(FIRLoggerLevel loggerLevel, BOOL analyticsComponent) { +/** + * Check if the level is high enough to be loggable. + * + * Analytics can override the log level with an intentional race condition. + * Add the attribute to get a clean thread sanitizer run. + */ +__attribute__((no_sanitize("thread"))) BOOL FIRIsLoggableLevel(FIRLoggerLevel loggerLevel, + BOOL analyticsComponent) { FIRLoggerInitializeASL(); if (sFIRLoggerDebugMode) { return YES; |