| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 177661
|
|
|
|
|
|
| |
equal strings are merged by the linker. Observed up to 1% binary size reduction. Thanks to Anton Korobeynikov for the suggestion
llvm-svn: 177264
|
|
|
|
|
|
| |
saves a bit of compile time and reduces the number of redundant global strings generated by asan (https://code.google.com/p/address-sanitizer/issues/detail?id=167)
llvm-svn: 177250
|
|
|
|
|
|
|
|
|
|
| |
This is the first step to making all DIScopes have a common metadata prefix (so
that things (using directives, for example) that can appear in any scope can be
added to that common prefix). DIFile is itself a DIScope so the common prefix
of all DIScopes cannot be a DIFile - instead it's the raw filename/directory
name pair.
llvm-svn: 177239
|
|
|
|
| |
llvm-svn: 177063
|
|
|
|
| |
llvm-svn: 176983
|
|
|
|
|
|
|
|
|
|
| |
Shadow checks are disabled and memory loads always produce fully initialized
values in functions that don't have a sanitize_memory attribute. Value and
argument shadow is propagated as usual.
This change also updates blacklist behaviour to match the above.
llvm-svn: 176247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory
CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))
for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S
llvm-svn: 176075
|
|
|
|
| |
llvm-svn: 175617
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Also, call these two new functions in memset/memcpy
instrumentation.
asan-rt part will follow.
llvm-svn: 175507
|
|
|
|
|
|
| |
long double will require a more general solution
llvm-svn: 175442
|
|
|
|
|
|
| |
https://code.google.com/p/address-sanitizer/issues/detail?id=151
llvm-svn: 175266
|
|
|
|
| |
llvm-svn: 175034
|
|
|
|
| |
llvm-svn: 174959
|
|
|
|
|
|
|
|
| |
It is way too slow. Change the default option value to 0.
Always do exact shadow propagation for unsigned ICmp with constants, it is
cheap (under 1% cpu time) and required for correctness.
llvm-svn: 173682
|
|
|
|
|
|
|
|
| |
Only for integers, pointers, and vectors of those. No floats.
Instrumentation seems very heavy, and may need to be replaced
with some approximation in the future.
llvm-svn: 173452
|
|
|
|
|
|
| |
the redzone)
llvm-svn: 173335
|
|
|
|
|
|
| |
Volatile bitfields can cause valid stores of uninitialized bits.
llvm-svn: 173153
|
|
|
|
|
|
| |
passes. Add test for non-default mapping scale and offset. No functionality change
llvm-svn: 172610
|
|
|
|
|
|
| |
They are failing on the bots.
llvm-svn: 172540
|
|
|
|
|
|
| |
Also improve test coveration of the handling of relational comparisons.
llvm-svn: 172539
|
|
|
|
|
|
|
|
|
| |
This fixes va_start/va_copy of a va_list field which happens to not
be laid out at a 16-byte boundary.
Differential Revision: http://llvm-reviews.chandlerc.com/D276
llvm-svn: 172128
|
|
|
|
|
|
| |
it describes one of 'interesting' allocas. Assume that allocas can go through casts and phi-nodes before apperaring as llvm.lifetime arguments
llvm-svn: 171153
|
|
|
|
|
|
|
| |
Origin alignment is as high as the alignment of the corresponding application
location, but never less than 4.
llvm-svn: 171110
|
|
|
|
|
|
|
| |
VectorType::getInteger() can not be used with them, because pointer size
depends on the target.
llvm-svn: 171070
|
|
|
|
| |
llvm-svn: 171069
|
|
|
|
| |
llvm-svn: 170883
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes adds shadow and origin propagation for unknown intrinsics
by examining the arguments and ModRef behaviour. For now, only 3 classes
of intrinsics are handled:
- those that look like simple SIMD store
- those that look like simple SIMD load
- those that don't have memory effects and look like arithmetic/logic/whatever
operation on simple types.
llvm-svn: 170530
|
|
|
|
|
|
| |
Origin address is always 4 byte aligned, and the access type is always i32.
llvm-svn: 170199
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ASan replaces <alloca instruction> with
<offset into a common large alloca>, it should also patch
llvm.dbg.declare calls and replace debug info descriptors to mark
that we've replaced alloca with a value that stores an address
of the user variable, not the user variable itself.
See PR11818 for more context.
llvm-svn: 169984
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of unconditionally storing origin with every application store,
only do this when the shadow of the stored value is != 0.
This change also delays instrumentation of stores until after the walk over
function's instructions, because adding new basic blocks confuses InstVisitor.
We only keep 1 origin value per 4 bytes of application memory. This change
fixes the bug when a store of a single clean byte wiped the origin for the
whole 4-byte area.
Since stores of uninitialized values are relatively uncommon, this change
improves performance of track-origins mode by 5% median and by up to 47% on
specs.
llvm-svn: 169490
|
|
|
|
| |
llvm-svn: 169383
|
|
|
|
|
|
|
| |
LinkOnceODRLinkage globals may be removed in GlobalOpt if not used in the
current module.
llvm-svn: 169377
|
|
|
|
| |
llvm-svn: 169256
|
|
|
|
|
|
| |
emit calls into runtime library that poison memory for local variables when their lifetime is over and unpoison memory when their lifetime begins.
llvm-svn: 169200
|
|
|
|
| |
llvm-svn: 168997
|
|
|
|
|
|
|
| |
This is a special case of signed relational comparison where result
only depends on the sign of x.
llvm-svn: 168881
|
|
|
|
|
|
|
| |
This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.
llvm-svn: 168880
|
|
|
|
| |
llvm-svn: 168877
|
|
|
|
| |
llvm-svn: 168874
|
|
|
|
|
|
| |
Compiler pass only.
llvm-svn: 168866
|
|
|
|
|
|
| |
the callee
llvm-svn: 168861
|
|
|
|
|
|
| |
LLVM part. This requires a clang part which will follow.
llvm-svn: 168781
|
|
|
|
| |
llvm-svn: 168684
|
|
|
|
| |
llvm-svn: 168586
|
|
|
|
|
|
| |
linkage in -asan-initialization-order mode
llvm-svn: 168367
|
|
|
|
|
|
| |
instrumented even in -asan-initialization-order mode. This time with a test
llvm-svn: 168366
|
|
|
|
| |
llvm-svn: 167615
|
|
|
|
| |
llvm-svn: 167612
|
|
|
|
|
|
| |
binary size a bit)
llvm-svn: 167230
|