Commit Graph

10 Commits

Author SHA1 Message Date
Alexey Samsonov 3741ab82ba Change StackDepot interface to use StackTrace more extensively
llvm-svn: 220637
2014-10-26 06:23:07 +00:00
Alexey Samsonov 9c85927012 [Sanitizer] Make StackTrace a lightweight reference to array of PCs, and
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

llvm-svn: 220635
2014-10-26 03:35:14 +00:00
Evgeniy Stepanov bb91e02efd [msan] Make origin tracking fork-safe.
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.

llvm-svn: 217140
2014-09-04 10:36:14 +00:00
Evgeniy Stepanov 208aae8ee0 [msan] Chained origins re-design.
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.

llvm-svn: 209284
2014-05-21 09:02:13 +00:00
Alexey Samsonov ef643ce471 [sanitizer] fix code style
llvm-svn: 189474
2013-08-28 11:26:09 +00:00
Sergey Matveev 9e3e80208f [sanitizer] Add a fast version of StackDepotGet() for use in LSan.
Add a class that holds a snapshot of the StackDepot optimized for querying by
ID. This allows us to speed up LSan dramatically.

llvm-svn: 189217
2013-08-26 13:24:43 +00:00
Evgeniy Stepanov 358698279d [sanitizer] Further split private and public sanitizer headers.
And make msan_interface.h C-compatible.

llvm-svn: 173928
2013-01-30 13:12:08 +00:00
Kostya Serebryany a11cd57a78 [asan] asan_allocator2: by default use the StackDepot to store the stack traces instead of storing them in the redzones
llvm-svn: 171099
2012-12-26 06:30:02 +00:00
Dmitry Vyukov 191f2f7cdb tsan: use stack depot to describe heap blocks
llvm-svn: 162902
2012-08-30 13:02:30 +00:00
Dmitry Vyukov f4792878c4 asan/tsan: first version of "stack depot"
llvm-svn: 162897
2012-08-30 10:02:48 +00:00