diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-01-22 13:33:16 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-01-22 13:33:16 +0000 |
commit | a50b9b2e06f85fef88f27724a16f6f62c5dd229f (patch) | |
tree | fdb90d4fb82539e5764d63c3b5f26dec36a0899a /lib/msan/msan.h | |
parent | cafe9a53643f3d813fa0a328a62175e19ff3a1ca (diff) |
[msan] Better use-after-free reports.
By attaching an extra integer tag to heap origins, we are able
to distinguish between uninits
- created by heap allocation,
- created by heap deallocation (i.e. use-after-free),
- created by __msan_allocated_memory call,
- etc.
See https://code.google.com/p/memory-sanitizer/issues/detail?id=35.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r-- | lib/msan/msan.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h index f4ea6ca6f..38972981e 100644 --- a/lib/msan/msan.h +++ b/lib/msan/msan.h @@ -167,6 +167,8 @@ void UnpoisonThreadLocalState(); // the previous origin id. u32 ChainOrigin(u32 id, StackTrace *stack); +const int STACK_TRACE_TAG_POISON = StackTrace::TAG_CUSTOM + 1; + #define GET_MALLOC_STACK_TRACE \ BufferedStackTrace stack; \ if (__msan_get_track_origins() && msan_inited) \ |