summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
* [ASan] Fix zero_page_pc test for PowerPCJay Foad2014-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: In the Power architecture, all branch instructions ignore the 2 least significant bits of the target address. Consequently if you branch to an invalid address, the address reported along with the SIGSEGV will have been rounded down to a multiple of 4. Tweak this test accordingly. This may fix the test for ARM too, in which case we could remove the XFAIL, but I have no way of testing that. Reviewers: kcc, willschm, glider, samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6167 llvm-svn: 221542
* [Sanitizer] Introduce "stack_trace_format" runtime flag.Alexey Samsonov2014-11-061-10/+10
| | | | | | | | | | | | | | | | This flag can be used to specify the format of stack frames - user can now provide a string with placeholders, which should be printed for each stack frame with placeholders replaced with actual data. For example "%p" will be replaced by PC, "%s" will be replaced by the source file name etc. "DEFAULT" value enforces default stack trace format currently used in all the sanitizers except TSan. This change also implements __sanitizer_print_stack_trace interface function in TSan. llvm-svn: 221469
* Use GET_CURRENT_FRAME() to calculate the memory layout for power. This worksWill Schmidt2014-11-061-0/+37
| | | | | | | | | | | | | for both PPC64 Big and Little endian modes, so also eliminates the need for the BIG_ENDIAN/LITTLE_ENDIAN #ifdeffery. By trial and error, it also looks like the kPPC64_ShadowOffset64 value is valid using (1ULL << 41) for both BE and LE, so that #if/#elif/#endif block has also been simplified. Differential Revision: http://reviews.llvm.org/D6044 llvm-svn: 221457
* UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbasesDavid Majnemer2014-11-061-1/+2
| | | | | | | | | | | | When the __virtual_mask is set, __offset_flags >> __offset_shift yields an offset into the vtable. Dereferencing this vtable slot gets us the vbase offset. Adjust a test case to verify that this, in fact, works. Differential Revision: http://reviews.llvm.org/D6074 llvm-svn: 221445
* Fix failing allow_user_segv.cc test on OS X 10.10Kuba Brecka2014-11-051-12/+23
| | | | | | | | The current ASan testcase Posix/allow_user_segv.cc expects SIGBUS to be triggered on 32-bit Darwin. This has apparently changed on 10.10 to trigger SIGSEGV instead, just as on 64-bit. Let's just install handlers for both SIGSEGV and SIGBUS instead of #ifdef'ing. Reviewed at http://reviews.llvm.org/D6121 llvm-svn: 221381
* [dfsan] Add runtime function for aborting on indirect calls toPeter Collingbourne2014-11-051-0/+24
| | | | | | uninstrumented vararg functions. llvm-svn: 221364
* Disable XFAIL on ARM since the x86_64 specific code is isolatedRenato Golin2014-11-051-2/+0
| | | | llvm-svn: 221347
* Get the Linux ptrace test working on PowerPC64Jay Foad2014-11-051-1/+18
| | | | | | | | | | | | | | The test refers to user_regs_struct.rip so it can only ever have worked on x86-64. Put this code inside an appropriate #if, and add a similar case for PowerPC64. (If we do likewise for ARM we can probably remove the XFAILs, but I have no way of testing that.) Those changes are enough to get the test working for me on big-endian PowerPC64 Fedora 19. Differential Revision: http://reviews.llvm.org/D6108 llvm-svn: 221337
* Use @rpath as LC_ID_DYLIB for ASan dylib on OS XKuba Brecka2014-11-041-3/+1
| | | | | | | | Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library. Reviewed at http://reviews.llvm.org/D6018 llvm-svn: 221278
* [TSan] Don't strip binary/library name until the moment we print it.Alexey Samsonov2014-11-042-9/+9
| | | | | | | | | | | | | | | This commit changes the place where TSan runtime turns full path to binary or shared library into its basename (/usr/foo/mybinary -> mybinary). Instead of doing it as early as possible (when we obtained the full path from the symbolizer), we now do it as late as possible (right before printing the error report). This seems like a right thing to do - stripping to basename is a detail of report formatting implementation, and should belong there. Also, we might need the full path at some point - for example, to match the suppressions. llvm-svn: 221225
* [asan] run-time part of the caller-callee coverage instrumentationKostya Serebryany2014-10-311-0/+74
| | | | llvm-svn: 220975
* Update __dfsw_s{,n}printf custom functions for new calling convention.Peter Collingbourne2014-10-301-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D6029 llvm-svn: 220907
* [Tsan] Enable thread sanitizer tests on FreeBSDViktor Kutuzov2014-10-271-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5995 llvm-svn: 220676
* Add runtime flag 'symbolize_inline_frames' to disable symbolization of ↵Alexey Samsonov2014-10-242-4/+13
| | | | | | inlined frames done in llvm-symbolizer llvm-svn: 220582
* tsan: support mmap(MAP_32BIT)Dmitry Vyukov2014-10-241-0/+41
| | | | | | | | | Allow user memory in the first TB of address space. This also enabled non-pie binaries and freebsd. Fixes issue: https://code.google.com/p/thread-sanitizer/issues/detail?id=5 llvm-svn: 220571
* [Tsan] Fix the thread_name tests to build on FreeBSDViktor Kutuzov2014-10-242-3/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D5855 llvm-svn: 220552
* [Tsan] Fix the signal_recursive.cc test to build on FreeBSDViktor Kutuzov2014-10-241-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5841 llvm-svn: 220550
* [msan] Handle param-tls overflow.Evgeniy Stepanov2014-10-221-0/+74
| | | | | | | | ParamTLS (shadow for function arguments) is of limited size. This change makes all arguments that do not fit unpoisoned, and avoids writing past the end of a TLS buffer. llvm-svn: 220351
* [asan] the run-time part of intra-object-overflow detector ↵Kostya Serebryany2014-10-171-0/+31
| | | | | | (-fsanitize-address-field-padding=1). Note that all of this is still experimental; don't use unless you are brave. llvm-svn: 220013
* [asan] make sure coverage is dumped even if leaks are reportedKostya Serebryany2014-10-161-0/+20
| | | | llvm-svn: 219946
* UBSAN stable runtime more generic with arm* targetsRenato Golin2014-10-161-1/+1
| | | | llvm-svn: 219924
* Adds stable-runtime to ubsan to avoid broken ARM tests with asanRenato Golin2014-10-162-0/+6
| | | | llvm-svn: 219906
* [Tsan] Fix the sunrpc.cc test to build on FreeBSDViktor Kutuzov2014-10-151-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D5730 llvm-svn: 219791
* [Tsan] Make the mutex_robust tests Linux-specificViktor Kutuzov2014-10-152-0/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D5729 llvm-svn: 219790
* tsan: fix false positive related to signalsDmitry Vyukov2014-10-152-2/+29
| | | | | | | Write interceptor calls malloc, which causes a false unsafe-call-in-signal-handler report. See the test. llvm-svn: 219784
* Re-enable ASAN/UBSAN tests on ARM, with VFP3 they began to passRenato Golin2014-10-145-5/+0
| | | | | | | | When compiling with -mfpu=vfpv3, those tests began to pass, like the others with "Illegal Instruction" error, so removing the XFAIL from them should get the bot green (and have more tests!). llvm-svn: 219721
* [UBSan] XFAIL test added in r219642 on DarwinAlexey Samsonov2014-10-141-0/+3
| | | | llvm-svn: 219699
* tsan: refactor atexit handlingDmitry Vyukov2014-10-141-0/+56
| | | | | | | | | | The current handling (manual execution of atexit callbacks) is overly complex and leads to constant problems due to mutual ordering of callbacks. Instead simply wrap callbacks into our wrapper to establish the necessary synchronization. Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=80 llvm-svn: 219675
* Sanitize upcasts and conversion to virtual base.Alexey Samsonov2014-10-132-1/+32
| | | | | | | | | | | This change adds UBSan check to upcasts. Namely, when we perform derived-to-base conversion, we: 1) check that the pointer-to-derived has suitable alignment and underlying storage, if this pointer is non-null. 2) if vptr-sanitizer is enabled, and we perform conversion to virtual base, we check that pointer-to-derived has a matching vptr. llvm-svn: 219642
* tsan: better reporting for virtual-call-after-freeDmitry Vyukov2014-10-131-0/+34
| | | | | | | Previously we said that it's a data race, which is confusing if it happens in the same thread. llvm-svn: 219600
* [UBSan] Disable one run line of this test to allow the test as a wholeChandler Carruth2014-10-111-1/+1
| | | | | | | | | | | to pass in an opt build. The test case in question does show UBSan catching the error, but it doesn't then successfully set the exit code of the program. I'll let the UBSan folks sort out why. It should reproduce trivially with an optimized build. llvm-svn: 219563
* [UBSan] Fix UBSan testcase for float->int conversion after LLVM r219542.Alexey Samsonov2014-10-111-2/+5
| | | | llvm-svn: 219559
* [asan][mips] Adding support of asan for mipsel archPetar Jovanovic2014-10-101-1/+1
| | | | | | | | | | | cmake/config-ix.cmake: Enabled building of asan for mipsel arch test/asan/CMakeLists.txt: Enabled testing of asan for mipsel Patch by Kumar Sukhani Differential Revision: http://reviews.llvm.org/D5615 llvm-svn: 219496
* Disabling main() check on UBSAN, since the noreturn check is already madeRenato Golin2014-10-101-2/+0
| | | | llvm-svn: 219488
* [Tsan] Fix the getline_nohang.cc test to build on FreeBSDViktor Kutuzov2014-10-101-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D5666 llvm-svn: 219482
* [Tsan] Fix comments in the user_fopen.cc and user_malloc.cc testsViktor Kutuzov2014-10-102-2/+2
| | | | | | Related revision: http://reviews.llvm.org/D5670 llvm-svn: 219481
* [Tsan] Make the user_fopen.cc and user_malloc.cc tests Linux-specificViktor Kutuzov2014-10-103-0/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D5670 llvm-svn: 219478
* XFAIL some more sanitiser ARMv7l testsRenato Golin2014-10-095-0/+5
| | | | | | Some more tests failing on the ARMv7 buildbot. llvm-svn: 219404
* [Tsan] Fix the signal_errno.cc and signal_malloc.cc tests to pass on FreeBSDViktor Kutuzov2014-10-092-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5669 llvm-svn: 219399
* [Tsan] Fix the global_race tests to pass on FreeBSDViktor Kutuzov2014-10-093-3/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D5668 llvm-svn: 219398
* [Tsan] Fix the blacklist2.cc test to pass on FreeBSDViktor Kutuzov2014-10-091-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D5665 llvm-svn: 219397
* Mark sanitizer tests XFAIL on ARMv7Renato Golin2014-10-0823-0/+25
| | | | | | | | | ASAN, UBSAN and profile tests that don't work with arm-linux-gnueabi and android also don't work on armv7l-linux-gnueabihf. Some of the tests have known causes, others not yet. In order to get a green bot, I'm disabling those tests for now and will investigate when the priority rises. llvm-svn: 219343
* Custom wrappers for DFSanitizing sprintf & snprintf.Lorenzo Martignoni2014-10-082-10/+129
| | | | | | Differential Revision: http://reviews.llvm.org/D5561 llvm-svn: 219293
* Run profile tests on FreeBSDEd Maste2014-10-072-5/+9
| | | | | | | | | | | | FreeBSD does not have libdl, so set it via lit.cfg instead of the test input, as with asan. Also remove it from Darwin test runs - it's not necessary, but harmless there. Add FreeBSD to the list of hosts to test. Differential Revision: http://reviews.llvm.org/D5650 llvm-svn: 219227
* Fixed asan-asm-stacktrace-test.ccYuri Gorshenin2014-10-071-3/+7
| | | | | | | | Summary: Fixed asan-asm-stacktrace-test.cc. Now it's supported on x86_64 and added test run when no debug info is generated. Differential Revision: http://reviews.llvm.org/D5547 llvm-svn: 219200
* [asan] make new_array_cookie_test more robustKostya Serebryany2014-10-011-2/+7
| | | | llvm-svn: 218841
* [asan] Scale back mmap_limit_mb test.Evgeniy Stepanov2014-10-011-4/+4
| | | | | | | | There is some strange interaction between mmap limit and unlimited stack (ulimit -s unlimited), which results in this test failing when run with "make". llvm-svn: 218764
* [sanitizer] Add i686 arch to compiler-rt.Evgeniy Stepanov2014-10-011-0/+1
| | | | | | | | | | This is needed so we can produce -i686- named libraries for x86 Android (which is i686-linux-android). An alternative solution would be keeping the "i386" name internally and tweaking the OUTPUT_NAME of compiler-rt libraries. llvm-svn: 218761
* [asan] Tune down mmap_limit_mb test.Evgeniy Stepanov2014-10-011-6/+6
| | | | | | The memory limits were a bit too large for 32-bit Android. llvm-svn: 218759
* Disable the ubsan-asan config on Darwin.Alexander Potapenko2014-10-012-2/+4
| | | | | | UBSan doesn't work together with ASan on Darwin yet, see http://llvm.org/bugs/show_bug.cgi?id=21112 llvm-svn: 218746
OpenPOWER on IntegriCloud