| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
the allocator_may_return_null flag)
llvm-svn: 190128
|
|
|
|
|
|
| |
(controlled by the allocator_may_return_null flag)
llvm-svn: 190127
|
|
|
|
|
|
| |
Tested on Linux, since I can't build the tests on Windows yet.
llvm-svn: 190022
|
|
|
|
|
|
| |
stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test
llvm-svn: 189457
|
|
|
|
| |
llvm-svn: 186577
|
|
|
|
|
|
| |
(http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint
llvm-svn: 183647
|
|
|
|
| |
llvm-svn: 183411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
kill). Also, disable swapcontext_test on non-x86. Fix lint
llvm-svn: 182456
|
|
|
|
| |
llvm-svn: 182353
|
|
|
|
|
|
| |
See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details
llvm-svn: 182255
|
|
|
|
| |
llvm-svn: 181991
|
|
|
|
| |
llvm-svn: 181890
|
|
|
|
| |
llvm-svn: 181881
|
|
|
|
| |
llvm-svn: 181429
|
|
|
|
|
|
| |
See https://code.google.com/p/address-sanitizer/issues/detail?id=131.
llvm-svn: 180093
|
|
|
|
| |
llvm-svn: 178758
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before: the function name was stored by the compiler as a constant string
and the run-time was printing it.
Now: the PC is stored instead and the run-time prints the full symbolized frame.
This adds a couple of instructions into every function with non-empty stack frame,
but also reduces the binary size because we store less strings (I saw 2% size reduction).
This change bumps the asan ABI version to v3.
compiler-rt part, llvm part will follow.
Example of report (now):
==31711==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa77cf1c5 at pc 0x41feb0 bp 0x7fffa77cefb0 sp 0x7fffa77cefa8
READ of size 1 at 0x7fffa77cf1c5 thread T0
#0 0x41feaf in Frame0(int, char*, char*, char*) stack-oob-frames.cc:20
#1 0x41f7ff in Frame1(int, char*, char*) stack-oob-frames.cc:24
#2 0x41f477 in Frame2(int, char*) stack-oob-frames.cc:28
#3 0x41f194 in Frame3(int) stack-oob-frames.cc:32
#4 0x41eee0 in main stack-oob-frames.cc:38
#5 0x7f0c5566f76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#6 0x41eb1c (/usr/local/google/kcc/llvm_cmake/a.out+0x41eb1c)
Address 0x7fffa77cf1c5 is located in stack of thread T0 at offset 293 in frame
#0 0x41f87f in Frame0(int, char*, char*, char*) stack-oob-frames.cc:12 <<<<<<<<<<<<<< this is new
This frame has 6 object(s):
[32, 36) 'frame.addr'
[96, 104) 'a.addr'
[160, 168) 'b.addr'
[224, 232) 'c.addr'
[288, 292) 's'
[352, 360) 'd'
llvm-svn: 177723
|
|
|
|
|
|
| |
checks if memory freed by user was indeed previously allocated, it first does an atomic write to presumed location of chunk header. This is wrong, as if the free is invalid, we may overwrite some valuable data (like other fields of the chunk header). Fix this by using atomic_compare_exchange instead.
llvm-svn: 177710
|
|
|
|
| |
llvm-svn: 177270
|
|
|
|
| |
llvm-svn: 177263
|
|
|
|
|
|
| |
ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)
llvm-svn: 177069
|
|
|
|
|
|
| |
New allocator has 1.5x memory overhead of the old one.
llvm-svn: 176340
|
|
|
|
| |
llvm-svn: 176264
|
|
|
|
|
|
| |
memset. Speeds up calloc-intensive code
llvm-svn: 176185
|
|
|
|
|
|
| |
more strict checking in memcmp
llvm-svn: 176078
|
|
|
|
| |
llvm-svn: 175728
|
|
|
|
| |
llvm-svn: 175655
|
|
|
|
|
|
|
|
| |
declarations to asan_intercepted_functions.h
Now that we have only one dependency on asan_intercepted_functions.h, we can unite that code with the interceptors declarations in asan_interceptors.cc and get rid of asan_intercepted_functions.h
llvm-svn: 175631
|
|
|
|
| |
llvm-svn: 175514
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.
asan-rt part
Also fix lint.
llvm-svn: 175508
|
|
|
|
|
|
| |
-I sanitizer_common/tests to asan/tests/CMakeLists.txt
llvm-svn: 175142
|
|
|
|
|
|
| |
Enable AddressSanitizer.AllocDeallocMismatch tests.
llvm-svn: 174628
|
|
|
|
| |
llvm-svn: 174188
|
|
|
|
|
|
| |
that makes sure users can include interface header
llvm-svn: 174058
|
|
|
|
| |
llvm-svn: 173795
|
|
|
|
|
|
| |
why we have to do this in comments.
llvm-svn: 173776
|
|
|
|
|
|
| |
realloc(malloc(0), 4)
llvm-svn: 173681
|
|
|
|
| |
llvm-svn: 173668
|
|
|
|
| |
llvm-svn: 173443
|
|
|
|
| |
llvm-svn: 173441
|
|
|
|
| |
llvm-svn: 173336
|
|
|
|
|
|
| |
simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space)
llvm-svn: 173260
|
|
|
|
| |
llvm-svn: 173251
|
|
|
|
| |
llvm-svn: 173142
|
|
|
|
| |
llvm-svn: 173133
|
|
|
|
|
|
| |
dynamic ASan runtime there
llvm-svn: 173132
|
|
|
|
| |
llvm-svn: 173131
|
|
|
|
| |
llvm-svn: 173130
|
|
|
|
|
|
| |
building with a debug clang, which takes a couple of minutes on this large file with templates). More splits to follow
llvm-svn: 173129
|