Viktor Kutuzov
1f386f0f36
Fix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit mode
...
llvm-svn: 210988
2014-06-15 13:56:28 +00:00
Evgeniy Stepanov
e5c34ace7f
[asan] Make ReplaceSystemMalloc optional on Android.
...
Don't fail if __libc_malloc_dispatch is missing; continue running
with normal linux interceptors instead.
llvm-svn: 210322
2014-06-06 10:57:21 +00:00
Kostya Serebryany
5181dd3a56
[asan] Improve vDSO check in AsanCheckDynamicRTPrereqs; patch by Yuri Gribov
...
llvm-svn: 210012
2014-06-02 10:39:40 +00:00
Evgeniy Stepanov
dd7cb28572
[asan] Enable ASan on PowerPC.
...
Patch by Peter Bergner.
llvm-svn: 209879
2014-05-30 08:52:03 +00:00
Viktor Kutuzov
82185a2088
Declare _DYNAMIC and dl_phdr_info in asan_linux.cc on FreeBSD
...
llvm-svn: 205852
2014-04-09 13:37:19 +00:00
Alexey Samsonov
11ff0a26a4
[ASan] Fix incompatible runtimes check: don't iterate /proc/self/maps on every call to __asan_init
...
llvm-svn: 205418
2014-04-02 13:09:22 +00:00
Alexey Samsonov
2c66a22e56
[ASan] One more attempt to fix Android build
...
llvm-svn: 205411
2014-04-02 09:36:36 +00:00
Alexey Samsonov
107e4abfd0
[ASan] Fix Android build
...
llvm-svn: 205311
2014-04-01 13:42:16 +00:00
Alexey Samsonov
56b6ee9833
[ASan] Optional support for dynamic ASan runtime on Linux.
...
Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov!
llvm-svn: 205308
2014-04-01 13:16:30 +00:00
Viktor Kutuzov
ebb00e1553
Add FreeBSD 9.2 support to asan_linux.cc
...
llvm-svn: 203658
2014-03-12 12:44:36 +00:00
Alexey Samsonov
5ec35b75ef
[FreeBSD] Provide FreeBSD-specific things for ASan.
...
Patch by Viktor Kutuzov!
llvm-svn: 203100
2014-03-06 09:05:52 +00:00
Alexey Samsonov
3d9adc0a73
[ASan] Speed up stack trace unwinding for stacks of size 2.
...
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
2014-03-04 13:12:25 +00:00
Kostya Serebryany
c98ce28533
[sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan Roux
...
llvm-svn: 201303
2014-02-13 07:50:20 +00:00
Evgeniy Stepanov
6db97e82a4
Add a copy of missing <ucontext.h> for Android and enable ASan SEGV handler.
...
This change adds a copy of <ucontext.h> for Android found in google-breakpad
that is missing from the official NDK.
ASan SEGV handler is still disabled by default and can be enabled with
ASAN_OPTIONS=handle_segv.
llvm-svn: 201084
2014-02-10 13:34:43 +00:00
Alexander Potapenko
cf4bef3161
[ASan] Move the signal handling-related flags to sanitizer_common.
...
This change is a part of refactoring intended to have common signal handling behavior in all tools.
llvm-svn: 200295
2014-01-28 09:28:57 +00:00
Chandler Carruth
736f9fd229
Revert three patches which were committed without explicit contribution
...
by their authors.
This may break builds where others added code relying on these patches,
but please *do not* revert this commit. Instead, we will prepare patches
which fix the failures.
Reverts the following commits:
r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu"
r168356: "[asan] more support for powerpc, patch by Peter Bergner"
r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)"
llvm-svn: 196802
2013-12-09 19:25:51 +00:00
Kostya Serebryany
a92b07d684
[asan] support __hppa__ (by John David Anglin)
...
llvm-svn: 194995
2013-11-18 08:20:13 +00:00
Kostya Serebryany
c1aa0e8f69
[asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y
...
llvm-svn: 183105
2013-06-03 14:49:25 +00:00
Sergey Matveev
af179b8d63
[sanitizer] Move GetStackTrace from ASan to sanitizer_common.
...
llvm-svn: 181424
2013-05-08 12:45:55 +00:00
Alexey Samsonov
21cb74318c
[ASan] Kill the remainders of platform defines in favor of SANITIZER_ defines
...
llvm-svn: 178629
2013-04-03 07:29:53 +00:00
Alexey Samsonov
54afba8b62
[ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.
...
llvm-svn: 177634
2013-03-21 11:23:41 +00:00
Alexey Samsonov
cf025cb2e6
[ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry
...
llvm-svn: 177501
2013-03-20 09:23:28 +00:00
Evgeniy Stepanov
0af672326a
[sanitizer] Replace more platform checks with SANITIZER_ constants.
...
llvm-svn: 177400
2013-03-19 14:33:38 +00:00
Evgeniy Stepanov
d3b56605f1
[sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.
...
llvm-svn: 177397
2013-03-19 13:54:41 +00:00
Alexey Samsonov
9585613334
[ASan] fixes for Android build
...
llvm-svn: 172800
2013-01-18 09:20:06 +00:00
Alexey Samsonov
4f1885a109
[ASan] minor changes to swapcontext handling: don't clear shadow memory if context stack is too large
...
llvm-svn: 172727
2013-01-17 15:45:28 +00:00
Dmitry Vyukov
f22982bf0a
asan/tsan: move blocking mutex from asan to sanitizer_common
...
llvm-svn: 172380
2013-01-14 07:51:39 +00:00
Kostya Serebryany
bb69879d09
[asan] pop the internal stack frames in SlowUnwindStack, extend the test to check this
...
llvm-svn: 170124
2012-12-13 12:31:55 +00:00
Kostya Serebryany
baf583c443
[asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder
...
llvm-svn: 170117
2012-12-13 09:34:23 +00:00
Kostya Serebryany
214b715061
[asan] two more bits for __sparc__
...
llvm-svn: 169141
2012-12-03 18:39:21 +00:00
Kostya Serebryany
f22c697f58
[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
...
llvm-svn: 168517
2012-11-23 15:38:49 +00:00
Alexey Samsonov
aac36b345a
[ASan] intercept swapcontext on Linux only
...
llvm-svn: 168509
2012-11-23 10:14:44 +00:00
Kostya Serebryany
6db8ad43df
[asan] pop the two internal functions from the stack trace produced by _Unwind_Backtrace (Peter Bergner)
...
llvm-svn: 168369
2012-11-20 15:15:44 +00:00
Kostya Serebryany
46de580003
[asan] more support for powerpc, patch by Peter Bergner
...
llvm-svn: 168356
2012-11-20 07:00:42 +00:00
Dmitry Vyukov
4ee90c231a
asan: sync with gcc r193553
...
llvm-svn: 168151
2012-11-16 11:26:05 +00:00
Kostya Serebryany
ee92877f17
[asan] more refactoring to move StackTrace to sanitizer_common
...
llvm-svn: 162752
2012-08-28 13:25:55 +00:00
Kostya Serebryany
6b0d775229
[asan] some renaming before we move StackTrace into sanitizer_common
...
llvm-svn: 162747
2012-08-28 11:54:30 +00:00
Evgeniy Stepanov
be01398612
A few tweaks for building ASanRT against Android NDK.
...
llvm-svn: 162666
2012-08-27 11:15:55 +00:00
Alexander Potapenko
fefc1e989c
If the program is linked to a dynamic ASan runtime which is not present in DYLD_INSERT_LIBRARIES
...
(which, in turn, is required for our interceptors to take effect), re-exec the program with
DYLD_INSERT_LIBRARIES set.
llvm-svn: 162547
2012-08-24 09:22:05 +00:00
Alexander Potapenko
51e6488b31
Intercept CFAllocator for each thread in the program.
...
Test that child threads use the ASan allocator, that allocated memory can be passed to another thread and deallocated on it.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=81
llvm-svn: 160630
2012-07-23 14:07:58 +00:00
Alexey Samsonov
34efb8e9b9
[ASan] Use common flags parsing machinery.
...
llvm-svn: 159933
2012-07-09 14:36:04 +00:00
Alexey Samsonov
c70d1086f6
[Sanitizer] move rest of mmap routines to common sanitizer runtime
...
llvm-svn: 158452
2012-06-14 14:42:58 +00:00
Alexey Samsonov
0c53a38abb
[Sanitizer] move portable GetEnv to common sanitizer runtime
...
llvm-svn: 158451
2012-06-14 14:07:21 +00:00
Alexey Samsonov
52f946611f
[ASan] don't include deleted header
...
llvm-svn: 158448
2012-06-14 13:15:45 +00:00
Alexey Samsonov
cf4d3a027d
[Sanitizer] Fix mac build.
...
llvm-svn: 158141
2012-06-07 07:32:00 +00:00
Alexey Samsonov
4b1f1031e6
[Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.
...
llvm-svn: 158140
2012-06-07 07:13:46 +00:00
Alexey Samsonov
28a9895ee0
[Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.
...
llvm-svn: 158139
2012-06-07 06:15:12 +00:00
Alexey Samsonov
40d5b772e5
[Sanitizer] Switch to common mmap/munmap routines in ASan run-time.
...
llvm-svn: 158078
2012-06-06 16:15:07 +00:00
Alexey Samsonov
c4b201308b
[ASan] Use __sanitizer::Die() in ASan runtime.
...
llvm-svn: 158051
2012-06-06 07:02:44 +00:00
Alexey Samsonov
8602c65719
[Sanitizer] remove using namespace __sanitizer lines
...
llvm-svn: 157999
2012-06-05 14:05:09 +00:00