| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 175623
|
| |
|
|
| |
llvm-svn: 175622
|
| |
|
|
| |
llvm-svn: 175618
|
| |
|
|
| |
llvm-svn: 175615
|
| |
|
|
| |
llvm-svn: 175614
|
| |
|
|
| |
llvm-svn: 175515
|
| |
|
|
| |
llvm-svn: 175514
|
| |
|
|
|
|
| |
This way it fits on a random 1G device.
llvm-svn: 175513
|
| |
|
|
|
|
| |
providing ASAN_DEFAULT_OPTIONS macro
llvm-svn: 175512
|
| |
|
|
| |
llvm-svn: 175511
|
| |
|
|
| |
llvm-svn: 175510
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
execle(argv[0], ...) is wrong, because argv[0] may contain a PATH-resolvable
program name. Execute /proc/self/exe instead.
llvm-svn: 175504
|
| |
|
|
| |
llvm-svn: 175503
|
| |
|
|
| |
llvm-svn: 175499
|
| |
|
|
| |
llvm-svn: 175498
|
| |
|
|
|
|
| |
bfd linker have different flag syntax)
llvm-svn: 175431
|
| |
|
|
|
|
| |
addr2line/llvm-symbolizer demangle the functions names
llvm-svn: 175429
|
| |
|
|
| |
llvm-svn: 175424
|
| |
|
|
| |
llvm-svn: 175285
|
| |
|
|
| |
llvm-svn: 175284
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MaybeReexec() does now a tricky job to manage DYLD_INSERT_LIBRARIES in a safe way.
Because we're using library interposition, it's critical for an instrumented app
to be executed with the runtime library present in DYLD_INSERT_LIBRARIES list.
Therefore if it's initially missing in that list, we append the runtime library name
to the value of DYLD_INSERT_LIBRARIES and then exec() ourselves.
On the other hand, some of the apps exec()ed by our program may not want to have
ASan runtime library preloaded, so we remove the runtime library from the
DYLD_INSERT_LIBRARIES if it's already there.
Users may want to preload other libraries using DYLD_INSERT_LIBRARIES, so we preserve those.
llvm-svn: 175276
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When prelink is installed in the system, prelink-ed
libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap,
so we need so split the address space even further, like this:
|| [0x10007fff8000, 0x7fffffffffff] || HighMem ||
|| [0x02008fff7000, 0x10007fff7fff] || HighShadow ||
|| [0x004000000000, 0x02008fff6fff] || ShadowGap3 ||
|| [0x003000000000, 0x003fffffffff] || MidMem ||
|| [0x00087fff8000, 0x002fffffffff] || ShadowGap2 ||
|| [0x00067fff8000, 0x00087fff7fff] || MidShadow ||
|| [0x00008fff7000, 0x00067fff7fff] || ShadowGap ||
|| [0x00007fff8000, 0x00008fff6fff] || LowShadow ||
|| [0x000000000000, 0x00007fff7fff] || LowMem ||
Do it only if necessary.
Also added a bit of profiling code to make sure that the
mapping code is efficient.
Added a lit test to simulate prelink-ed libraries.
Unfortunately, this test does not work with binutils-gold linker.
If gold is the default linker the test silently passes.
Also replaced
__has_feature(address_sanitizer)
with
__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
in two places.
Patch partially by Jakub Jelinek.
llvm-svn: 175263
|
| |
|
|
|
|
|
| |
/proc/$PID/cmdline is clipped to 4Kb.
Locate argv and envp on the main thread stack.
llvm-svn: 175163
|
| |
|
|
| |
llvm-svn: 175157
|
| |
|
|
|
|
| |
The test may hang now if a regression occurs.
llvm-svn: 175155
|
| |
|
|
| |
llvm-svn: 175153
|
| |
|
|
|
|
| |
We are still limited by /proc/*/cmdline size (4Kb max on Linux!).
llvm-svn: 175145
|
| |
|
|
|
|
| |
-I sanitizer_common/tests to asan/tests/CMakeLists.txt
llvm-svn: 175142
|
| |
|
|
| |
llvm-svn: 175140
|
| |
|
|
| |
llvm-svn: 175137
|
| |
|
|
|
|
|
| |
base-to-derived casts have undefined behavior if the object is not actually an
instance of the derived type. Runtime library part.
llvm-svn: 175079
|
| |
|
|
|
|
|
|
|
| |
existing DYLD_INSERT_LIBRARIES correctly.
Previously ASan used to hang in an exec loop, because it failed to overwrite the env var value
(see https://code.google.com/p/address-sanitizer/issues/detail?id=159).
llvm-svn: 175059
|
| |
|
|
|
|
| |
better memory range access functions (put only 1 event to trace) (Go)
llvm-svn: 175056
|
| |
|
|
| |
llvm-svn: 175049
|
| |
|
|
|
|
| |
add weak function __msan_default_options that overrides default options
llvm-svn: 175040
|
| |
|
|
| |
llvm-svn: 175037
|
| |
|
|
| |
llvm-svn: 175013
|
| |
|
|
| |
llvm-svn: 174971
|
| |
|
|
| |
llvm-svn: 174970
|
| |
|
|
|
|
|
|
|
| |
In __isoc99_*scanf we don't have to worry about GNUisms, and can parse
%a accurately.
Patch by Jakub Jelinek.
llvm-svn: 174969
|
| |
|
|
| |
llvm-svn: 174965
|
| |
|
|
| |
llvm-svn: 174962
|
| |
|
|
| |
llvm-svn: 174960
|
| |
|
|
|
|
| |
roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part
llvm-svn: 174958
|
| |
|
|
| |
llvm-svn: 174956
|
| |
|
|
| |
llvm-svn: 174888
|
| |
|
|
|
|
|
| |
Respect REAL(scanf) return value and don't report memory stores that
could potentially happen, but did not.
llvm-svn: 174887
|
| |
|
|
| |
llvm-svn: 174883
|
| |
|
|
|
|
|
|
|
| |
Handle %a in cases when it is unambiguous.
Handle %m.
Patch by Jakub Jelinek.
llvm-svn: 174882
|