| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 224396
|
|
|
|
|
|
|
|
|
|
| |
SetCanPoisonMemory()/CanPoisonMemory() functions are now used
instead of "poison_heap" flag to determine if ASan is allowed
to poison the shadow memory. This allows to hot-patch this
value in runtime (e.g. during ASan activation) without introducing
a data race.
llvm-svn: 224395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Turn "allocator_may_return_null" common flag into an
Allocator::may_return_null bool flag. We want to make sure
that common flags are immutable after initialization. There
are cases when we want to change this flag in the allocator
at runtime: e.g. in unit tests and during ASan activation
on Android.
Test Plan: regression test suite, real-life applications
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6623
llvm-svn: 224148
|
|
|
|
| |
llvm-svn: 220637
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
favor of
a unified interface in <sanitizer/allocator_interface.h>.
llvm-svn: 215469
|
|
|
|
|
|
| |
the report more verbose
llvm-svn: 214299
|
|
|
|
|
|
| |
-Xclang -fsized-deallocation). Not yet on Mac. Also, remove some unused code.
llvm-svn: 214296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce new public header <sanitizer/allocator_interface.h> and a set
of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc.
that will eventually replace their tool-specific equivalents
(__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific
functions are now deprecated and implemented as stubs redirecting
to __sanitizer_ versions (which are implemented differently in each tool).
Replace all uses of __xsan_ versions with __sanitizer_ versions in unit
and lit tests.
llvm-svn: 212469
|
|
|
|
| |
llvm-svn: 208776
|
|
|
|
|
|
| |
larger than needed. This was a leftover of the allocator1=>allocator2 migration; thanks Yuri Gribov for reminding
llvm-svn: 206280
|
|
|
|
|
|
| |
are usable in plain C
llvm-svn: 206160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We don't need to do any work in this case - just take
the current PC and caller PC.
Reviewers: eugenis, ygribov
Reviewed By: eugenis
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2936
llvm-svn: 202845
|
|
|
|
|
|
|
| |
This is covered by AddressSanitizer.UAF_* tests in asan_test
with start_deactivated=1.
llvm-svn: 200696
|
|
|
|
|
|
| |
SEGV when asan run-time is built with gcc 4.8.2 on 32-bit arch)
llvm-svn: 199544
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds ASAN_OPTIONS=start_deactivated=1 flag. When present, ASan will
start in "deactivated" mode, with no heap poisoning, no quarantine, no stack
trace gathering, and minimal redzones. All this features come back when
__asan_init is called for the constructor of an instrumented library.
The primary use case for this feature is Android. Code itself is not
Android-specific, and this patch includes a Linux test for it.
llvm-svn: 199377
|
|
|
|
|
|
| |
https://code.google.com/p/address-sanitizer/issues/detail?id=257
llvm-svn: 198932
|
|
|
|
| |
llvm-svn: 198873
|
|
|
|
|
|
| |
SANITIZER_CAN_USE_ALLOCATOR64=0). No functionality change by default is intended
llvm-svn: 198044
|
|
|
|
| |
llvm-svn: 197040
|
|
|
|
|
|
|
|
|
|
|
| |
Invoke a fatal stack trace unwinder when ASan prints allocator-relevant
error reports (double-free, alloc-dealloc-mismatch, invalid-free).
Thus we'll be able to print complete stack trace even if allocation/free
stacks are not stored (malloc_context_size=0).
Based on the patch by Yuri Gribov!
llvm-svn: 194579
|
|
|
|
| |
llvm-svn: 193868
|
|
|
|
| |
llvm-svn: 193615
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes a deadlock which happens in lsan
on a large memalign-allocated chunk that resides in lsan's root set.
Reviewers: samsonov, earthdok
Reviewed By: earthdok
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1957
llvm-svn: 192885
|
|
|
|
| |
llvm-svn: 192793
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Out-of-bound access may touch not-yet allocated or already freed
and recycled from quarantine chunks. We should treat this situation as
a "free-range memory access" and avoid printing any data about that
irrelevant chunk (which may be inconsistent).
This should fix https://code.google.com/p/address-sanitizer/issues/detail?id=183
Reviewers: kcc
Reviewed By: kcc
CC: timurrrr, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1893
llvm-svn: 192581
|
|
|
|
| |
llvm-svn: 190860
|
|
|
|
|
|
| |
the allocator_may_return_null flag)
llvm-svn: 190128
|
|
|
|
|
|
| |
(controlled by the allocator_may_return_null flag)
llvm-svn: 190127
|
|
|
|
|
|
| |
SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used
llvm-svn: 188261
|
|
|
|
|
|
|
| |
Also clean up LSan code, fix some comments and replace void* with uptr
to bring down the number of reinterpret_casts.
llvm-svn: 184700
|
|
|
|
| |
llvm-svn: 184557
|
|
|
|
|
|
| |
Fix for the case where disabler is used in pthread key destructor.
llvm-svn: 184553
|
|
|
|
| |
llvm-svn: 184422
|
|
|
|
|
|
| |
spurious crashes in LSan when it walked through reused chunks. Don't know how to create not-brittle test case for this.
llvm-svn: 184404
|
|
|
|
| |
llvm-svn: 183748
|
|
|
|
| |
llvm-svn: 183651
|
|
|
|
|
|
| |
(http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint
llvm-svn: 183647
|
|
|
|
| |
llvm-svn: 183429
|
|
|
|
|
|
| |
Leak annotation similar to HeapChecker's IgnoreObject().
llvm-svn: 183412
|
|
|
|
|
|
| |
before calling memcpy
llvm-svn: 183390
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this change, the user may safely call __asan_get_ownership()
from malloc/free hooks and assume it would return "true". If there is a
realloc/free race, free hook might be called twice, but I think it's acceptable,
as it's a data race and would later be reported anyway.
This change also fixes a bug when failing realloc incorrectly marked the
original memory as "quarantinned".
Reviewers: timurrrr, kcc, samsonov
Reviewed By: samsonov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D913
llvm-svn: 183220
|
|
|
|
| |
llvm-svn: 183218
|
|
|
|
|
|
|
| |
Objects allocated after a call to __lsan_disable() will be treated as
live memory. Also add a ScopedDisabler.
llvm-svn: 183099
|
|
|
|
| |
llvm-svn: 182994
|
|
|
|
|
|
| |
In this CL all old tests are removed and one LIT test is added.
llvm-svn: 182730
|
|
|
|
| |
llvm-svn: 182470
|
|
|
|
|
|
| |
makefile-based build for LSan
llvm-svn: 182465
|
|
|
|
| |
llvm-svn: 182379
|
|
|
|
|
|
| |
See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details
llvm-svn: 182255
|