summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_stackdepot.cc
AgeCommit message (Collapse)Author
2016-11-18rename InternalBinarySearch to InternalLowerBoundMike Aizatsky
Summary: The new name better corresponds to its logic. Reviewers: kcc Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D26821 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16fixing binary search for cases when element is not in arrayMike Aizatsky
Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D26707 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287078 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30[sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar
- Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248964 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[msan] Better use-after-free reports.Evgeniy Stepanov
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
2014-10-27[Sanitizer] Return code that calculates hash for stacktrace back to ↵Alexey Samsonov
StackDepot implementation git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220663 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26Change StackDepot interface to use StackTrace more extensivelyAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220637 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26[Sanitizer] Make StackTrace a lightweight reference to array of PCs, andAlexey Samsonov
introduce a BufferedStackTrace class, which owns this array. Summary: This change splits __sanitizer::StackTrace class into a lightweight __sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace, which owns it. This would allow us to simplify the interface of StackDepot, and eventually merge __sanitizer::StackTrace with __tsan::StackTrace. Test Plan: regression test suite. Reviewers: kcc, dvyukov Reviewed By: dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5985 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220635 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-04[msan] Make origin tracking fork-safe.Evgeniy Stepanov
Chained origins make plain memory stores async-signal-unsafe. We already disable it inside signal handlers. This change grabs all origin-related locks before fork() and releases them after fork() to avoid a deadlock in the child process. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217140 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-07[msan] Increase hash table size for chained origins.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212448 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21[tsan] Fix gotsan build.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209286 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21[msan] Chained origins re-design.Evgeniy Stepanov
Generalize StackDepot and create a new specialized instance of it to efficiently (i.e. without duplicating stack trace data) store the origin history tree. This reduces memory usage for chained origins roughly by an order of magnitude. Most importantly, this new design allows us to put two limits on stored history data (exposed in MSAN_OPTIONS) that help avoid exponential growth in used memory on certain workloads. See comments in lib/msan/msan_origin.h for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-26[sanitizer] Add a fast version of StackDepotGet() for use in LSan.Sergey Matveev
Add a class that holds a snapshot of the StackDepot optimized for querying by ID. This allows us to speed up LSan dramatically. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189217 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-26[asan] asan_allocator2: by default use the StackDepot to store the stack ↵Kostya Serebryany
traces instead of storing them in the redzones git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171099 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17tsan: reserve msb in stack depot id's (required for msan)Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164010 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31tsan: improve stack depotDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162993 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30tsan: use stack depot to describe heap blocksDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30asan/tsan: first version of "stack depot"Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162897 91177308-0d34-0410-b5e6-96231b3b80d8