[msan] Allow nested symbolizer and loader scopes.

llvm-svn: 191196
This commit is contained in:
Evgeniy Stepanov 2013-09-23 13:26:31 +00:00
parent f7456c78f0
commit f497bfee76
1 changed files with 6 additions and 6 deletions

View File

@ -58,8 +58,8 @@ static THREADLOCAL struct {
uptr stack_top, stack_bottom; uptr stack_top, stack_bottom;
} __msan_stack_bounds; } __msan_stack_bounds;
static THREADLOCAL bool is_in_symbolizer; static THREADLOCAL int is_in_symbolizer;
static THREADLOCAL bool is_in_loader; static THREADLOCAL int is_in_loader;
extern "C" SANITIZER_WEAK_ATTRIBUTE const int __msan_track_origins; extern "C" SANITIZER_WEAK_ATTRIBUTE const int __msan_track_origins;
@ -87,12 +87,12 @@ static bool IsRunningUnderDr() {
return result; return result;
} }
void EnterSymbolizer() { is_in_symbolizer = true; } void EnterSymbolizer() { ++is_in_symbolizer; }
void ExitSymbolizer() { is_in_symbolizer = false; } void ExitSymbolizer() { --is_in_symbolizer; }
bool IsInSymbolizer() { return is_in_symbolizer; } bool IsInSymbolizer() { return is_in_symbolizer; }
void EnterLoader() { is_in_loader = true; } void EnterLoader() { --is_in_loader; }
void ExitLoader() { is_in_loader = false; } void ExitLoader() { --is_in_loader; }
extern "C" { extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE