| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test
llvm-svn: 189457
|
|
|
|
| |
llvm-svn: 188116
|
|
|
|
|
| |
r187967: Disable inlining between sanitized and non-sanitized functions.
llvm-svn: 187971
|
|
|
|
| |
llvm-svn: 187881
|
|
|
|
| |
llvm-svn: 187878
|
|
|
|
| |
llvm-svn: 187877
|
|
|
|
| |
llvm-svn: 187269
|
|
|
|
| |
llvm-svn: 186607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, the reason I came here: I forgot to look at readdir64_r which had
the exact same bug as readdir_r. However, upon applying the same
quick-fix and testing it I discovered that it still didn't work at all.
As a consequence, I spent some time studying the code and thinking about
it and fixed several other problems.
Second, the code was checking for a null entry and result pointer, but
there is no indication that null pointers are viable here. Certainly,
the spec makes it extremely clear that there is no non-error case where
the implementation of readdir_r fails to dereference the 'result'
pointer and store NULL to it. Thus, our checking for a non-null 'result'
pointer before reflecting that write in the instrumentation was
trivially dead. Remove it.
Third, the interceptor was marking the write to the actual dirent struct
by looking at the entry pointer, but nothing in the spec requires that
the dirent struct written is actually written into the entry structure
provided. A threadlocal buffer would be just as conforming, and the spec
goes out of its way to say the pointer to the *actual* result dirent
struct is stored into *result, so *that* is where the interceptor should
reflect a write occuring. This also obviates the need to even consider
whether the 'entry' parameter is null.
Fourth, I got to the bottom of why nothing at all worked in readdir64_r
-- the interceptor structure for dirent64 was completely wrong in that
it was the same as dirent. I fixed this struct to be correct (64-bit
inode and 64-bit offset! just a 64-bit offset isn't enough!) and added
several missing tests for the size and layout of this struct.
llvm-svn: 186109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.
I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.
I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.
llvm-svn: 185998
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D1094
llvm-svn: 185980
|
|
|
|
| |
llvm-svn: 185342
|
|
|
|
| |
llvm-svn: 185318
|
|
|
|
| |
llvm-svn: 185315
|
|
|
|
| |
llvm-svn: 185286
|
|
|
|
|
|
| |
instead of python script
llvm-svn: 185163
|
|
|
|
| |
llvm-svn: 185148
|
|
|
|
| |
llvm-svn: 185142
|
|
|
|
|
|
|
|
| |
write-protected.
Add a test.
llvm-svn: 185140
|
|
|
|
|
|
|
|
|
| |
to out-of-bounds mprotect()s
(https://code.google.com/p/address-sanitizer/issues/detail?id=203)
Add a test.
llvm-svn: 185138
|
|
|
|
| |
llvm-svn: 184717
|
|
|
|
| |
llvm-svn: 184639
|
|
|
|
|
|
| |
chunks allocated there
llvm-svn: 184546
|
|
|
|
| |
llvm-svn: 184541
|
|
|
|
| |
llvm-svn: 184540
|
|
|
|
|
|
|
|
|
|
| |
Replace hardcoded ioctl request ids with symbolic names.
Disable certain ioctls on platforms where such names are not found in the
system headers.
Fix a bug in ioctl_lookup.
Reenable ioctl test on Mac.
llvm-svn: 184183
|
|
|
|
|
|
| |
lit tests
llvm-svn: 183977
|
|
|
|
|
|
|
| |
The test used to execute a 64-bit /bin/bash binary and preload a 32-bit dynamic library into it.
Now the arch-specific version of echo-env is executed instead.
llvm-svn: 183662
|
|
|
|
| |
llvm-svn: 183655
|
|
|
|
|
|
| |
and 64-bit modes
llvm-svn: 183638
|
|
|
|
| |
llvm-svn: 183527
|
|
|
|
|
|
|
| |
ASan: disabled by default
MSan: enabled by default
TSan: disabled
llvm-svn: 183517
|
|
|
|
|
|
| |
64-bit mode. Clean up RUN-lines in tests.
llvm-svn: 183498
|
|
|
|
| |
llvm-svn: 183410
|
|
|
|
|
|
| |
tests, and use it in ASan
llvm-svn: 183401
|
|
|
|
|
|
| |
lit tests, and use it in ASan
llvm-svn: 183400
|
|
|
|
| |
llvm-svn: 183395
|
|
|
|
| |
llvm-svn: 183391
|
|
|
|
| |
llvm-svn: 183387
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 182862
|
|
|
|
| |
llvm-svn: 182858
|
|
|
|
|
|
| |
This CL enables thread support in LSan when used on top of ASan.
llvm-svn: 182854
|
|
|
|
|
|
|
|
| |
Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!
llvm-svn: 182726
|
|
|
|
|
|
|
|
|
|
| |
We don't want to report initialization-order bugs when a destructor of a global
variable accesses dynamically initialized global from another
(not necessarily initialized) module. We do this by intercepting __cxa_atexit and
registrering our own callback that unpoisons shadow for all dynamically initialized
global variables.
llvm-svn: 182637
|
|
|
|
|
|
| |
properly symbolized
llvm-svn: 182463
|
|
|
|
|
|
| |
debian it complains that _SC_PAGESIZE is unknown)
llvm-svn: 182462
|
|
|
|
|
|
| |
interface_symbols_linux on non-x86
llvm-svn: 182461
|
|
|
|
|
|
| |
kill). Also, disable swapcontext_test on non-x86. Fix lint
llvm-svn: 182456
|
|
|
|
| |
llvm-svn: 182380
|