summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revised test to pass under updated dtor callback implementation"Daniel Jasper2015-08-121-0/+2
| | | | | | | This breaks the buildbot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/19656 llvm-svn: 244724
* Revised test to pass under updated dtor callback implementationNaomi Musgrave2015-08-121-2/+0
| | | | | | | | | | | | Summary: New implementation for dtor sanitizer callback poisons only class members, and emits poisoning callback before base dtor invoked. Reviewers: eugenis, kcc Differential Revision: http://reviews.llvm.org/D11952 Explicit dtor invocation llvm-svn: 244709
* [windows] Use lld-link instead of lld-link2, the latter no longer existsReid Kleckner2015-08-111-1/+1
| | | | | | | The test passed for me locally because I had a stale copy of lld-link2.exe. llvm-svn: 244638
* [windows] Remove CHECK for strdup symbol that comes from the CRTReid Kleckner2015-08-111-2/+3
| | | | | | llvm-symbolizer isn't symbolizing it for some reason. I'll investigate. llvm-svn: 244629
* [Windows] Use llvm-symbolizer before using dbghelpReid Kleckner2015-08-114-9/+39
| | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-symbolizer understands both PDBs and DWARF, so it's a better bet if it's available. It prints out the function parameter types and column numbers, so I needed to churn the expected test output a bit. This makes most of the llvm-symbolizer subprocessing code target-independent. Pipes on all platforms use fd_t, and we can use the portable ReadFromFile / WriteToFile wrappers in symbolizer_sanitizer.cc. Only the pipe creation and process spawning is Windows-specific. Please check that the libcdep layering is still correct. I don't know how to reproduce the build configuration that relies on that. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11791 llvm-svn: 244616
* [compiler-rt] Add SourceLocations for float_cast_overflow data.Filipe Cabecinhas2015-08-111-11/+13
| | | | | | | | | | | | | | | | | | | | | | Summary: Compiler-rt part of http://reviews.llvm.org/D11757 I ended up making UBSan work with both the old version and the new version of the float_cast_overflow data (instead of just erroring with the previous version). The old version will try to symbolize its caller. Now we compile the float_cast_overflow tests without -g, and make sure we have the source file+line+column. If you think I'm trying too hard to make sure we can still use both versions, let me know. Reviewers: samsonov, rsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11793 llvm-svn: 244567
* [cmake] Hoist check for LLD sources up into root CMakeLists.txtReid Kleckner2015-08-113-1/+6
| | | | | | | | We will use this for ASan on Windows soon. When the ELF port of LLD matures, we can add other sanitizer integration tests to make sure they work with LLD. llvm-svn: 244549
* [Windows] Relax test case patterns to allow parameter listsReid Kleckner2015-08-1015-28/+28
| | | | | | | | llvm-symbolizer will print parameter types. Split out from D11791. NFC llvm-svn: 244522
* test case for poisoning trivial membersNaomi Musgrave2015-08-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A virtual base class and derived class should only poison their respective members upon destruction. In particular, trivial members should be poisoned directly, non-trivial members should be poisoned by their respective destructors, and references to non-trivial members should be poisoned. Reviewers: eugenis, kcc Differential Revision: http://reviews.llvm.org/D11912 Test case avoids casting to access members Run configurations to reflect expected runtime failure on assertions. Simplified access to internal members. Updated internal member structure of base. Revised assert in main to verify successful poisoning after dtor. Verify address of pointer is poisoned. Fixed assert err. Cleaned up test by removing extraneous prints, asserts. llvm-svn: 244521
* [ASAN/AArch64] Disable forkpty tests until we can fix themRenato Golin2015-08-081-0/+1
| | | | | | | Reported in PR24400. Disable until it works, so we can keep the rest tested and green. llvm-svn: 244398
* [ASAN/AArch64] Make sure aarch64 is not stable-runtimeRenato Golin2015-08-061-1/+1
| | | | llvm-svn: 244263
* test: Use lld-link instead of lld-link2 as the LTO linker on Windows.Peter Collingbourne2015-08-061-2/+2
| | | | | | The old COFF linker has been removed and lld-link now refers to the new linker. llvm-svn: 244243
* [sanitizer] 2-nd attempt. Add the flag handle_sigfpe that is default true to ↵Kostya Serebryany2015-08-062-1/+31
| | | | | | handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski. This time the test is enabled only on x86-64 (it broke on ARM) llvm-svn: 244234
* Revert "[sanitizer] Add the flag handle_sigfpe that is default true to ↵Renato Golin2015-08-062-28/+1
| | | | | | | | handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski" This reverts commit r244136, it was breaking the ARM bots for too long. We should investigate it offline. llvm-svn: 244210
* Add flag to request codeview debug info on WindowsReid Kleckner2015-08-051-0/+2
| | | | | | Needed after fixing PR22032. llvm-svn: 244162
* [sanitizer] Add the flag handle_sigfpe that is default true to handle SIGFPE ↵Kostya Serebryany2015-08-052-1/+28
| | | | | | crashes same as SIGSEV crashes, patch by Karl Skomski llvm-svn: 244136
* [AArch64] Stable runtime required for proc maps testRenato Golin2015-08-051-1/+1
| | | | llvm-svn: 244105
* [UBSan] Fix UBSan-vptr false positive.Alexey Samsonov2015-08-051-0/+13
| | | | | | | | | Offset from vptr to the start of most-derived object can actually be positive in some virtual base class vtables. Patch by Stephan Bergmann! llvm-svn: 244101
* [tsan] Enable tsan for aarch64Adhemerval Zanella2015-08-0511-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enabled TSAN for aarch64 with 39-bit VMA layout. As defined by tsan_platform.h the layout used is: 0000 4000 00 - 0200 0000 00: main binary 2000 0000 00 - 4000 0000 00: shadow memory 4000 0000 00 - 5000 0000 00: metainfo 5000 0000 00 - 6000 0000 00: - 6000 0000 00 - 6200 0000 00: traces 6200 0000 00 - 7d00 0000 00: - 7d00 0000 00 - 7e00 0000 00: heap 7e00 0000 00 - 7fff ffff ff: modules and main thread stack Which gives it about 8GB for main binary, 4GB for heap and 8GB for modules and main thread stack. Most of tests are passing, with the exception of: * ignore_lib0, ignore_lib1, ignore_lib3 due a kernel limitation for no support to make mmap page non-executable. * longjmp tests due missing specialized assembly routines. These tests are xfail for now. The only tsan issue still showing is: rtl/TsanRtlTest/Posix.ThreadLocalAccesses Which still required further investigation. The test is disable for aarch64 for now. llvm-svn: 244055
* [asan] Enable asan for aarch64Adhemerval Zanella2015-08-054-2/+7
| | | | | | | | | | | | | | | | This patch enables asan for aarch64/linux. It marks it as 'unstable-release', since some tests are failing due either kernel missing support of non-executable pages in mmap or environment instability (infinite loop in juno reference boards). It sets decorate_proc_maps test to require stable-release, since the test expects the shadow memory to not be executable and the support for aarch64 is only added recently by Linux (da141706aea52c1a9 - 4.0). It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call as a TLS optimization. llvm-svn: 244054
* Runtime check of poisoning derived class members.Naomi Musgrave2015-08-031-0/+47
| | | | | | | | | | | | | | | | Summary: Simple test case to verify that an instance of a derived class with virtual base is properly poisoned Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11733 modified test to be more concise, and check the local pointer to the destroyed object revised test to not examine padding- only explicit object members llvm-svn: 243913
* [asan] Print VAs instead of RVAs for module offsets on WindowsReid Kleckner2015-08-032-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is consistent with binutils and ASan behavior on other platforms, and makes it easier to use llvm-symbolizer with WinASan. The --relative-address flag to llvm-symbolizer is also no longer needed. An RVA is a "relative virtual address", meaning it is the address of something inside the image minus the base of the mapping at runtime. A VA in this context is an RVA plus the "preferred base" of the module, and not a real runtime address. The real runtime address of a symbol will equal the VA iff the module is loaded at its preferred base at runtime. On Windows, the preferred base is stored in the ImageBase field of one of the PE file header, and this change adds the necessary code to extract it. On Linux, this offset is typically included in program and section headers of executables. ELF shared objects typically use a preferred base of zero, meaning the smallest p_vaddr field in the program headers is zero. This makes it so that PIC and PIE module offsets come out looking like RVAs, but they're actually VAs. The difference between them simply happens to be zero. Reviewers: samsonov, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11681 llvm-svn: 243895
* [asan] Link tests with ld.gold on Android.Evgeniy Stepanov2015-08-011-0/+5
| | | | | | | | ld.bfd fails to find dependencies of asan runtime library w/o an extra -rpath-link pointing to usr/lib under the sysroot. Gold does not have this problem. llvm-svn: 243802
* [ASan] Fix two tests on FreeBSD: alloca.h is missing there.Alexey Samsonov2015-07-312-2/+2
| | | | llvm-svn: 243800
* [UBSan] Test: Move coverage-levels.cc out of Linux directoryFilipe Cabecinhas2015-07-311-0/+0
| | | | | | | | | | | | | Summary: This test is working on other platforms. Reviewers: samsonov, emaste Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10415 llvm-svn: 243771
* Fix __floatsitf() for negative inputSergey Dmitrouk2015-07-311-0/+2
| | | | | | | | | Negative numbers were handled properly initially, but got broken during addressing review, so none of them did actually work. Issues: * Wrong negation. * Wrong exponent calculation. llvm-svn: 243746
* [AArch64|DFSAN] XPASS custom.cc, as it got fixed by r243686Renato Golin2015-07-311-3/+0
| | | | llvm-svn: 243743
* [dfsan] Enable dfsan for aarch64Adhemerval Zanella2015-07-301-0/+3
| | | | | | | | | | | | | This patch enable DFSan for AArch64 (39-bit VMA). All tests are passing but: * test/dfsan/custom.cc Due an invalid access in dl_iterate_phdr instrumentation (commenting out this function make the testcase to pass). The test is XFAIL for aarch64 for now. llvm-svn: 243688
* testing for tail call optimization repression when sanitizing use-after-dtorNaomi Musgrave2015-07-301-0/+45
| | | | | | | | | | | | | | | | | | Summary: Verify that running in optimized mode while checking for use-after-dtor errors, does not generate tail call invocation of destructor. This avoids possible error where stack frame for the destructor is eliminated, making tracking down the errors more difficult. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11614 simplified test cases updated line numbering on test renamed test llvm-svn: 243675
* Revert r243604, it (very likely) caused PR24312.Nico Weber2015-07-301-2/+2
| | | | llvm-svn: 243615
* [CMake] Pass -march=i686 when targeting i686 (PR24222)Hans Wennborg2015-07-301-2/+2
| | | | | | | | | | | | | | | | Clang will not define __i686__, even when the target triple is i686, without -march=i686. With this patch, the compiler-rt build will successfully detect that Clang can target i686. The open_memstream.cc test is a little funny. Before my patch, it was invoked with "-m32 -m64". To make it work after my -march change, I had to add '-march=x86-64'. Differential Revision: http://reviews.llvm.org/D11618 llvm-svn: 243604
* [asan,tsan,msan] move the memcmp interceptor from asan/tsan to ↵Kostya Serebryany2015-07-292-0/+57
| | | | | | sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1) llvm-svn: 243595
* [asan] XFAIL 1 test on Android.Evgeniy Stepanov2015-07-291-0/+1
| | | | | | | The test uses source file relative paths which does not work when the test is executed on a remote device. llvm-svn: 243564
* CFI: Update tests for various bit vector sizes following lowerbitsets optzns.Peter Collingbourne2015-07-2914-164/+102
| | | | | | | | Also add a test to ensure that this doesn't regress. Differential Revision: http://reviews.llvm.org/D11584 llvm-svn: 243547
* [asan] Read process name from /proc/self/cmdline on Linux.Evgeniy Stepanov2015-07-281-0/+70
| | | | | | | | | | Rename getBinaryBasename() to getProcessName() and, on Linux, read it from /proc/self/cmdline instead of /proc/self/exe. The former can be modified by the process. The main motivation is Android, where application processes re-write cmdline to a package name. This lets us setup per-application ASAN_OPTIONS through include=/some/path/%b. llvm-svn: 243473
* Fix typo from r243418. Should fix the failing `abort_on_error.cc` test.Kuba Brecka2015-07-281-1/+1
| | | | | | See http://reviews.llvm.org/D7203 llvm-svn: 243426
* Applying the Darwin-specific default lit ASAN_OPTIONS to UBSan+ASan tests asKuba Brecka2015-07-281-0/+6
| | | | | | | well. Should fix the test failures after r243418, see review at http://reviews.llvm.org/D7203. llvm-svn: 243423
* [asan] Set abort_on_error=1 by default on OS XKuba Brecka2015-07-283-2/+40
| | | | | | | | This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()). Differential Revision: http://reviews.llvm.org/D7203 llvm-svn: 243418
* [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' ↵Kuba Brecka2015-07-232-2/+2
| | | | | | | | | | instead of abusing '__asan_init' We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking. Reviewed at http://reviews.llvm.org/D11004 llvm-svn: 243004
* [asan] Remove CHECK line for kernel32.dllReid Kleckner2015-07-221-1/+0
| | | | | | | | | Windows 8 users report that it isn't present in the address space by default anymore. Fixes PR23773. llvm-svn: 242958
* [asan] Disable ctrl+c test until I figure out how to make it portableReid Kleckner2015-07-221-1/+1
| | | | llvm-svn: 242952
* [asan] Make __asan_handle_no_return tolerate unregistered threadsReid Kleckner2015-07-221-0/+130
| | | | | | | | | | | | | | | | | | | Summary: On Windows, thread injection by the kernel or other running processes is a fairly common occurrence, so ASan should be resilient to it. The comments on GetCurrentThread() say that it can return null, so we shouldn't be CHECK failing if it does. Sending control-C is one way to get the kernel to inject a thread into your process, so I wrote a test around it. Reviewers: llvm-commits Subscribers: samsonov Differential Revision: http://reviews.llvm.org/D11426 llvm-svn: 242948
* [asan] Test clang's SEH implementation as well as MSVC'sReid Kleckner2015-07-221-9/+11
| | | | llvm-svn: 242933
* [sanitizer] Implement include_if_exists with process name substitution.Evgeniy Stepanov2015-07-211-4/+29
| | | | | | | | | include_if_exists=/path/to/sanitizer/options reads flags from the file if it is present. "%b" in the include file path (for both variants of the flag) is replaced with the basename of the main executable. llvm-svn: 242853
* Reverting r242787, attempt 2.Kuba Brecka2015-07-211-0/+0
| | | | llvm-svn: 242799
* Reverting r242787 ("[asan] Fix the freopen interceptor to allow NULL instead ↵Kuba Brecka2015-07-211-12/+0
| | | | | | of a filename") to investigate buildbot failure. llvm-svn: 242791
* [asan] Fix the freopen interceptor to allow NULL instead of a filenameKuba Brecka2015-07-211-0/+12
| | | | | | | | According to man freopen, passing NULL instead of a filename is valid, however the current implementation of the interceptor assumes this parameter is non-NULL. Let's fix that and add a test case. Differential Revision: http://reviews.llvm.org/D11389 llvm-svn: 242787
* asan: fix a testDmitry Vyukov2015-07-191-4/+7
| | | | | | | Page size is not necessary 4096. Use sysconf to obtain page size. llvm-svn: 242651
* [sanitizer] De-flake one test.Evgeniy Stepanov2015-07-191-1/+2
| | | | | | | signal_segv_handler.cc occasionally fails due to a suspected kernel bug. Increasing the mapped region size seems to make the test pass reliably. llvm-svn: 242647
* [Sanitizer] Teach ReadFileToBuffer to distinguish empty file from ↵Alexey Samsonov2015-07-171-0/+6
| | | | | | | | | | | | | | | | inaccessible file. Summary: This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=399 (sanitizers crash with empty suppression files). Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11284 llvm-svn: 242594
OpenPOWER on IntegriCloud