summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/lit_tests
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan]: fix a CHECK failure in use-after-return mode; enable and fix ↵Kostya Serebryany2013-08-281-8/+14
| | | | | | stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test llvm-svn: 189457
* [tests] Update to use lit_config and lit package, as appropriate.Daniel Dunbar2013-08-094-15/+18
| | | | llvm-svn: 188116
* [sanitizer] ASan/MSan tests for r187967.Evgeniy Stepanov2013-08-081-0/+19
| | | | | r187967: Disable inlining between sanitized and non-sanitized functions. llvm-svn: 187971
* ASan: fix one more test case for pipefailAlexey Samsonov2013-08-071-1/+1
| | | | llvm-svn: 187881
* Distinguish 32-bit ASan from 64-bit ASan in lit configsAlexey Samsonov2013-08-071-1/+1
| | | | llvm-svn: 187878
* Enable pipefail for ASan testsAlexey Samsonov2013-08-0747-119/+117
| | | | llvm-svn: 187877
* disable pipefail on asan for now.Rafael Espindola2013-07-261-0/+1
| | | | llvm-svn: 187269
* Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605Hans Wennborg2013-07-181-2/+3
| | | | llvm-svn: 186607
* Fix a veritable conucopia of bugs in the readdir_r interceptors.Chandler Carruth2013-07-111-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a bug in the readdir_r interceptor: when we reach the end of theChandler Carruth2013-07-101-0/+30
| | | | | | | | | | | | | | | | | | 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
* [asan] Update blacklists to use categories.Peter Collingbourne2013-07-091-3/+3
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1094 llvm-svn: 185980
* [ASan] Properly disable strict init-order checking when pthread_create is calledAlexey Samsonov2013-07-012-0/+34
| | | | llvm-svn: 185342
* [ASan] Add sanity test for asan_symbolize.py scriptAlexey Samsonov2013-07-013-0/+51
| | | | llvm-svn: 185318
* [ASan] Remove leading underscores from function names in output testsAlexey Samsonov2013-07-0116-31/+31
| | | | llvm-svn: 185315
* Define the path to llvm-symbolizer tool in a common config to reduce copy-pasteAlexey Samsonov2013-06-301-4/+1
| | | | llvm-svn: 185286
* [ASan] Remove %symbolize from lit tests: we now use external symbolizer ↵Alexey Samsonov2013-06-2845-132/+126
| | | | | | instead of python script llvm-svn: 185163
* [ASan] Migrate lit tests to external symbolizer from asan_symbolize.py scriptAlexey Samsonov2013-06-281-14/+5
| | | | llvm-svn: 185148
* [sanitizer] Intercept ptrace.Evgeniy Stepanov2013-06-281-0/+52
| | | | llvm-svn: 185142
* [ASan][OSX] Make sure the zones created by malloc_create_zone() are ↵Alexander Potapenko2013-06-281-0/+20
| | | | | | | | write-protected. Add a test. llvm-svn: 185140
* [ASan][OSX] Fix the incorrect malloc_create_zone() implementation that led ↵Alexander Potapenko2013-06-281-0/+51
| | | | | | | | | to out-of-bounds mprotect()s (https://code.google.com/p/address-sanitizer/issues/detail?id=203) Add a test. llvm-svn: 185138
* [sanitizer] Intercept readv, preadv, writev, pwritev.Evgeniy Stepanov2013-06-241-0/+32
| | | | llvm-svn: 184717
* Add cmake rules for building LSan common on Mac OSAlexey Samsonov2013-06-221-0/+0
| | | | llvm-svn: 184639
* [ASan] reimplement strdup() interceptor to get nicer stack traces for memory ↵Alexey Samsonov2013-06-211-0/+19
| | | | | | chunks allocated there llvm-svn: 184546
* [ASan] make test for LSan annotations Linux-only for nowAlexey Samsonov2013-06-211-0/+0
| | | | llvm-svn: 184541
* [ASan] Check that ASan user may include and use LSan headersAlexey Samsonov2013-06-211-0/+16
| | | | llvm-svn: 184540
* [sanitizer] Symbolic ioctl names.Evgeniy Stepanov2013-06-181-4/+1
| | | | | | | | | | 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
* Properly install LSan interface header, rely on sanitizer header presence in ↵Alexey Samsonov2013-06-142-3/+3
| | | | | | lit tests llvm-svn: 183977
* [ASan] Fix unset-insert-libraries-on-exec.cc on 32-bit Darwin.Alexander Potapenko2013-06-102-6/+25
| | | | | | | 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
* [ASan] mark ioctl test as xfailing on darwin. remove redundant semicolonsAlexey Samsonov2013-06-101-0/+3
| | | | llvm-svn: 183655
* [ASan] don't use -m{32,64} flag in test case, as it can be run in both 32- ↵Alexey Samsonov2013-06-101-4/+4
| | | | | | and 64-bit modes llvm-svn: 183638
* [ASan] fix test case to use absolute pathsAlexey Samsonov2013-06-071-2/+2
| | | | llvm-svn: 183527
* [sanitizer] ioctl interceptor.Evgeniy Stepanov2013-06-071-0/+24
| | | | | | | ASan: disabled by default MSan: enabled by default TSan: disabled llvm-svn: 183517
* [ASan] create separate configs for running ASan lit tests in both 32- and ↵Alexey Samsonov2013-06-0770-433/+282
| | | | | | 64-bit mode. Clean up RUN-lines in tests. llvm-svn: 183498
* Simplify lit configs for asan/lsan/msan unit testsAlexey Samsonov2013-06-062-24/+6
| | | | llvm-svn: 183410
* [ASan] create common autogenerated config for running compiler-rt unit ↵Alexey Samsonov2013-06-062-17/+5
| | | | | | tests, and use it in ASan llvm-svn: 183401
* [ASan] lit tests: create common autogenerated config for running compiler-rt ↵Alexey Samsonov2013-06-062-26/+5
| | | | | | lit tests, and use it in ASan llvm-svn: 183400
* [ASan] move all lit_tests under TestCasesAlexey Samsonov2013-06-06100-3/+4
| | | | llvm-svn: 183395
* [ASan] Add a few tests for use-after-scope modeAlexey Samsonov2013-06-064-0/+85
| | | | llvm-svn: 183391
* [ASan] make free_hook_realloc test more robustAlexey Samsonov2013-06-061-4/+17
| | | | llvm-svn: 183387
* Call __asan_free_hook() before marking the chunk quarantinnedAlexey Samsonov2013-06-042-2/+32
| | | | | | | | | | | | | | | | | | | | | 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
* [asan] Fix r182858.Sergey Matveev2013-05-291-4/+0
| | | | llvm-svn: 182862
* [asan] Fix r182854: run the unpoison_tls test only on Linux.Sergey Matveev2013-05-291-0/+0
| | | | llvm-svn: 182858
* [asan] Make ASan report the correct thread address ranges to LSan.Sergey Matveev2013-05-291-0/+40
| | | | | | This CL enables thread support in LSan when used on top of ASan. llvm-svn: 182854
* Improve support for compiler-rt tests in CMake build.Alexey Samsonov2013-05-274-13/+15
| | | | | | | | 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
* Disable init-order checking before destructors are run.Alexey Samsonov2013-05-242-0/+47
| | | | | | | | | | 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
* [asan] enhance stack-overflow.cc test: check that the location frame is ↵Kostya Serebryany2013-05-221-1/+1
| | | | | | properly symbolized llvm-svn: 182463
* [asan] attempting to fix the debian bot (on ubuntu the test builds; on ↵Kostya Serebryany2013-05-221-0/+1
| | | | | | debian it complains that _SC_PAGESIZE is unknown) llvm-svn: 182462
* [asan] fix dlclose-test to work with non-4K pages. Properly disable ↵Kostya Serebryany2013-05-222-5/+9
| | | | | | interface_symbols_linux on non-x86 llvm-svn: 182461
* [asan] workaround for asan bug 189 (swapcontext followed by throw gets OOM ↵Kostya Serebryany2013-05-221-5/+33
| | | | | | kill). Also, disable swapcontext_test on non-x86. Fix lint llvm-svn: 182456
* [ASan] create default (empty) ASan blacklist file in resource directoryAlexey Samsonov2013-05-212-1/+5
| | | | llvm-svn: 182380
OpenPOWER on IntegriCloud