summaryrefslogtreecommitdiff
path: root/lib/msan/msan_chained_origin_depot.cc
AgeCommit message (Collapse)Author
2015-10-01[compiler-rt] Apply modernize-use-nullptr fixes in sanitizersVedant Kumar
- Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. - Add blank lines to separate function definitions. - Add 'extern "C"' or 'namespace foo' comments after the appropriate closing brackets This is a continuation of work from 409b7b82. The focus here is on the various sanitizers (not sanitizer_common, as before). Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13225 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248966 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03[msan] Change the way origin ids are built.Evgeniy Stepanov
Previously, all origin ids were "chained" origins, i.e values of ChainedOriginDepot. This added a level of indirection for simple stack and heap allocation, which were represented as chains of length 1. This costs both RAM and CPU, but provides a joined 2**29 origin id space. It also made function (any instrumented function) entry non-async-signal-safe, but that does not really matter because memory stores in track-origins=2 mode are not async-signal-safe anyway. With this change, the type of the origin is encoded in origin id. See comment in msan_origin.h for more details. This reduces chained and stack origin id range to 2**28 each, but leaves extra 2**31 for heap origins. This change should not have any user-visible effects. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223233 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-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-11[msan] A comment for the chained-origin-depot hash function.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212801 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10[msan] Switch chained origins hash to murmur2.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212704 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-07-07[msan] Better hash function for chained origins.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212440 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06[msan] Partial revert of r210331.Evgeniy Stepanov
Bots did not like it. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210332 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06[msan] Better diagnostic for invalid origin id.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210331 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