diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-12-11 10:55:42 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-12-11 10:55:42 +0000 |
commit | 60037927fdcfed87567a391c0adfddfe55cdf37a (patch) | |
tree | fb324cd94597357d2ee717c9c6980b976aebe648 /lib/msan/msan.h | |
parent | b0f72ff7baab944f5eddd94497e4b440d02dcad5 (diff) |
[msan] Get stack limits with pthread_create interceptor.
Before we did it lazily on the first stack unwind in the thread.
It resulted in deadlock when the unwind was caused by memory allocation
inside pthread_getattr_np:
pthread_getattr_np <<< not reentable
GetThreadStackTopAndBottom
__interceptor_realloc
pthread_getattr_np
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r-- | lib/msan/msan.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h index 4e6c61945..a50540b07 100644 --- a/lib/msan/msan.h +++ b/lib/msan/msan.h @@ -106,4 +106,10 @@ class ScopedThreadLocalStateBackup { #define MSAN_FREE_HOOK(ptr) \ if (&__msan_free_hook) __msan_free_hook(ptr) +struct MsanStackBounds { + uptr stack_top, stack_bottom; +}; + +extern THREADLOCAL MsanStackBounds msan_stack_bounds; + #endif // MSAN_H |