summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/lit_tests
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] make asan work with 7fff8000 offset and prelinkKostya Serebryany2013-02-151-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ASan] Fixed the wrong placement of #includeAlexander Potapenko2013-02-141-1/+1
| | | | llvm-svn: 175157
* [ASan] Remove the 'alarm' script which isn't present on OS X by default.Alexander Potapenko2013-02-141-2/+2
| | | | | | The test may hang now if a regression occurs. llvm-svn: 175155
* [ASan] When re-executing the process on OS X, make sure we update the ↵Alexander Potapenko2013-02-132-0/+33
| | | | | | | | | 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
* [sanitizer] Fix line numbers in a sanitizer lit test.Evgeniy Stepanov2013-02-111-5/+5
| | | | llvm-svn: 174861
* [asan] Fix off-by-one in AddrIsAtRight.Evgeniy Stepanov2013-02-081-0/+46
| | | | llvm-svn: 174710
* [ASan] Enable the new and delete wrappers on Darwin.Alexander Potapenko2013-02-071-9/+4
| | | | | | Also fix large_func_test.cc, which got broken when we switched to allocator2: the OOB access was too far from the original allocation, so ASan decided to describe the next one. llvm-svn: 174626
* [asan] Fix nonsensical reports of partial right OOB.Evgeniy Stepanov2013-02-052-1/+18
| | | | | | | | | | In case of partial right OOB, ASan was reporting X is located 0 bytes to the right of [A, B) where X was actually inside [A, B). With this change, ASan will report B as the error address in such case. llvm-svn: 174373
* [ASan] Split ASan interface header into private and public parts. Add a test ↵Alexey Samsonov2013-01-313-2/+10
| | | | | | that makes sure users can include interface header llvm-svn: 174058
* Use LLVM_BUILD_TYPE instead of CMAKE_BUILD_TYPE in compiler-rt unit tests to ↵Alexey Samsonov2013-01-301-1/+7
| | | | | | match the behavior of llvm unittests llvm-svn: 173926
* [Sanitizer] update style checker script and fix namespace style warningsAlexey Samsonov2013-01-301-1/+1
| | | | llvm-svn: 173910
* asan: fix the testDmitry Vyukov2013-01-291-1/+1
| | | | llvm-svn: 173786
* ASan: add output test for -fsanitize-address-zero-based-shadow option on LinuxAlexey Samsonov2013-01-221-0/+27
| | | | llvm-svn: 173146
* [ASan] Fix the path to ASan interface in interface_symbols_linux.cAlexander Potapenko2013-01-221-2/+2
| | | | llvm-svn: 173140
* [ASan] Moved interface_symbols.c to lit_tests/Linux.Alexander Potapenko2013-01-221-0/+0
| | | | | | We already have Darwin-specific version of this test. llvm-svn: 173136
* [ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.Alexander Potapenko2013-01-227-19/+61
| | | | | | | | This CL drastically simplifies the way we're hooking the memory allocation routines in ASan on Mac by using dylib interposition to replace the main malloc_zone_* functions. This allows us to avoid replacing the default CFAllocator and drop the CF dependency at all. Committing this patch will result in the static runtime being broken. A follow-up CL will switch ASan to use the dynamic runtime library. llvm-svn: 173134
* Temporary disable test added in r172828 as it seems to be flaky on the buildbotsAlexey Samsonov2013-01-201-0/+0
| | | | llvm-svn: 172976
* [ASan] Fix the log_path option to use different log files for parent and ↵Alexander Potapenko2013-01-181-0/+22
| | | | | | child processes after fork(). llvm-svn: 172828
* Make ASan and TSan tests a bit less brittle with @LINE FileCheck macroAlexey Samsonov2012-12-289-36/+30
| | | | llvm-svn: 171181
* Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can ↵Alexey Samsonov2012-12-271-10/+2
| | | | | | produce working binaries and use it in build rules for sanitizers tests llvm-svn: 171160
* [asan] relax asan/lit_tests/malloc_delete_mismatch.cc to make it pass on Mac ↵Kostya Serebryany2012-12-271-2/+2
| | | | | | 10.7 (where extra frames creep in between malloc and main) llvm-svn: 171145
* [ASan] Teach ASan to print demangled function name when describing stack frameAlexey Samsonov2012-12-261-0/+24
| | | | llvm-svn: 171112
* [ASan] Fix another FileCheck pattern to be c++filt-proof.Alexander Potapenko2012-12-211-1/+1
| | | | llvm-svn: 170878
* [asan] add a flag alloc_dealloc_mismatch (off by default for now) which ↵Kostya Serebryany2012-12-212-1/+27
| | | | | | finds malloc/delete, new/free, new/delete[], etc mismatches llvm-svn: 170869
* [ASan] Make the FileCheck pattern more c++filt-resistant.Alexander Potapenko2012-12-201-1/+1
| | | | | | | This test didn't pass for me locally because of "T0's stack" being converted to "T0'short stack" by c++filt. Strange enough this doesn't show up on our bots. llvm-svn: 170690
* [asan] pop the internal stack frames in SlowUnwindStack, extend the test to ↵Kostya Serebryany2012-12-131-0/+10
| | | | | | check this llvm-svn: 170124
* [asan] extend overflow-in-qsort.cc to check both unwind kinds. One more test ↵Kostya Serebryany2012-12-132-8/+60
| | | | | | for SlowUnwind. Move both to Linux dir (no slow unwind on Mac) llvm-svn: 170122
* [ASan] Allow leading underscore in function name to please output tests on MacAlexey Samsonov2012-12-131-1/+1
| | | | llvm-svn: 170121
* [asan] add asan/lit_tests/overflow-in-qsort.cc (not fully working yet)Kostya Serebryany2012-12-131-0/+35
| | | | llvm-svn: 170111
* ASan: fix interface-symbols test on Mac by explicitly listing all weak functionsAlexey Samsonov2012-12-081-1/+6
| | | | llvm-svn: 169660
* ASan: use new option -fsanitize-blacklist in output testsAlexey Samsonov2012-12-072-14/+14
| | | | llvm-svn: 169646
* ASan: change the strategy we use for installing malloc/free/symbolization ↵Alexey Samsonov2012-12-071-1/+2
| | | | | | hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime. llvm-svn: 169641
* ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to ↵Alexey Samsonov2012-12-041-0/+29
| | | | | | these functions are inserted by the instrumentation pass in use-after-scope mode llvm-svn: 169201
* [ASan] use brand new -fsanitize= values for init-order/use-after-return ASan ↵Alexey Samsonov2012-11-295-30/+38
| | | | | | output tests llvm-svn: 168951
* [ASan] move swapcontext_test to Linux-specific testsAlexey Samsonov2012-11-231-0/+0
| | | | llvm-svn: 168513
* [ASan] Add interceptor for swapcontext to fight with false positives in some ↵Alexey Samsonov2012-11-231-0/+66
| | | | | | of its use cases. llvm-svn: 168508
* [ASan] now we don't need llvm_obj_root to access llvm-symbolizer toolAlexey Samsonov2012-11-131-3/+2
| | | | llvm-svn: 167823
* [ASan] test blacklist functionality for global-init-order checker (r167725)Alexey Samsonov2012-11-123-0/+49
| | | | llvm-svn: 167727
* [ASan] Remove llvm-symbolizer from compiler-rt/utils/Alexander Potapenko2012-11-121-2/+2
| | | | | | | This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it with both cmake and configure+make. llvm-svn: 167722
* [ASan] Fix the golden stack for use-after-free.cc.Alexander Potapenko2012-11-121-3/+4
| | | | | | | The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames. This should fix PR 14251 llvm-svn: 167721
* Add a possible underscore before the wrappers to the output expectations for ↵Alexander Potapenko2012-11-092-2/+2
| | | | | | Darwin llvm-svn: 167610
* Update compiler-rt tests to match flag renaming/deprecation in Clang.Richard Smith2012-11-065-7/+7
| | | | llvm-svn: 167434
* Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit ↵Alexey Samsonov2012-10-301-2/+1
| | | | | | configs llvm-svn: 167010
* Re-enable this test now that r166172 has hacked around the terribleChandler Carruth2012-10-181-1/+1
| | | | | | limitations of the pass manager stack in the pass manager builder. llvm-svn: 166173
* [asan] added a test for a bug in asan at -O0 introduced by r165936 (making ↵Kostya Serebryany2012-10-171-0/+14
| | | | | | asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails) llvm-svn: 166103
* [asan] change the asan output slightly to avoid user confusion: a) add ':' ↵Kostya Serebryany2012-10-1510-10/+10
| | | | | | after 'AddressSanitizer' and b) changed 'crashed' to 'SEGV' llvm-svn: 165932
* [ASan] use llvm-symbolizer for ASan lit-style tests on MacAlexey Samsonov2012-10-0810-24/+19
| | | | llvm-svn: 165391
* [asan] properly report mmap failureKostya Serebryany2012-10-041-0/+16
| | | | llvm-svn: 165214
* [ASan] Change __asan_set_on_error_callback to weak overridable ↵Alexey Samsonov2012-10-021-0/+16
| | | | | | __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization) llvm-svn: 165008
* [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. ↵Alexey Samsonov2012-10-021-6/+2
| | | | | | Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization. llvm-svn: 165000
OpenPOWER on IntegriCloud