summaryrefslogtreecommitdiff
path: root/test/ubsan/TestCases/TypeCheck/misaligned.cpp
AgeCommit message (Collapse)Author
2017-05-15[ubsan] Don't enable debug info in all testsReid Kleckner
Add a lit substitution (I chose %gmlt) so that only stack trace tests get debug info. We need a lit substition so that this expands to -gline-tables-only -gcodeview on Windows. I think in the future we should reconsider the need for -gcodeview from the GCC driver, but for now, this is necessary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12[ubsan] Enable debug info in test binariesReid Kleckner
This fixes tests that use debug info to check ubsan stack traces. One was XFAILd on Windows and the other was actively failing for weeks. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[ubsan] Fall back to the fast unwinder when print_stacktrace=1Vedant Kumar
This makes it possible to get stacktrace info when print_stacktrace=1 on Darwin (where the slow unwinder is not currently supported [1]). This should not regress any other platforms. [1] The thread about r300295 has a relatively recent discusion about this. We should be able to enable the existing slow unwind functionality for Darwin, but this needs more testing. Differential Revision: https://reviews.llvm.org/D32517 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25Fix columns for member function callsHal Finkel
After r270775, Clang is smarter about the generating the locations for member-function calls. Update some ubsan tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270801 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25[UBSan] Test churn: use the approach from r244839 and r245962 in UBSan lit ↵Alexey Samsonov
tests. Introduce %env_ubsan_opts= substitution instead of specifying UBSAN_OPTIONS manually in the RUN-lines. This will come in handy once we introduce some default UBSAN_OPTIONS for the whole testsuite (for instance, make abort_on_error common option). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245967 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-12[windows] Always use the lit shell on Windows, even if bash is presentReid Kleckner
Summary: This is consistent with LLVM and Clang. The lit shell isn't a complete bash implementation, but its behavior is more easily reproducible. This fixes some ubsan test failures. One ubsan test requires a shell currently, so I added "REQUIRES: shell", and the other doesn't work on Windows because it prints a stack trace and uses a linker that doesn't support DWARF. We can fix it eventually through other means. Reviewers: samsonov, pcc Subscribers: yaron.keren, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D11960 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244837 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02UBSan: Enable runtime library tests on Windows, and get most tests passing.Peter Collingbourne
Specifically: - Disable int128 tests on Windows, as MSVC cl.exe does not support int128, so we might not have been able to build the runtime with int128 support. - XFAIL the vptr tests as we lack Microsoft ABI support. - XFAIL enum.cpp as UBSan fails to add the correct instrumentation code for some reason. - Modify certain tests that build executables multiple times to use unique names for each executable. This works around a race condition observed on Windows. - Implement IsAccessibleMemoryRange for Windows to fix the last misaligned.cpp test. - Introduce a substitution for testing crashes on Windows using KillTheDoctor. Differential Revision: http://reviews.llvm.org/D10864 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28Allow UBSan+MSan and UBSan+TSan combinations (Clang part).Alexey Samsonov
Embed UBSan runtime into TSan and MSan runtimes in the same as we do in ASan. Extend UBSan test suite to also run tests for these combinations. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235954 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-18Update for tests failing due to improvements in clang's column information ↵David Blaikie
for aggregate expressions git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12Update test cases for new -fsanitize-recover= semantics.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225725 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15[ubsan][arm] supporting misaligned testcaseKumar Sukhani
After previous commit: http://reviews.llvm.org/rL224242, misaligned testcase is now supported on ARM also git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224243 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15[UBSan][MIPS] Adding support of MIPS64 in UBSan testingKumar Sukhani
On mips64 addresses are 40-bit. Where as a 48 bit address is used in TypeCheck/misaligned.cpp. Using regular expression for that address. reviewed by : samsonov submitted by: sagar git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224242 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-14Update test case with more accurate column information now that Clang ↵David Blaikie
produces same git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224222 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-13Sanitize upcasts and conversion to virtual base.Alexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219642 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08Mark sanitizer tests XFAIL on ARMv7Renato Golin
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219343 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-17PR20721: Don't let UBSan print inaccessible memoryAlexey Samsonov
Summary: UBSan needs to check if memory snippet it's going to print resides in addressable memory. Similar check might be helpful in ASan with dump_instruction_bytes option (see http://reviews.llvm.org/D5167). Instead of scanning /proc/self/maps manually, delegate this check to the OS kernel: try to write this memory in a syscall and assume that memory is inaccessible if the syscall failed (e.g. with EFAULT). Fixes PR20721. Test Plan: compiler-rt test suite Reviewers: eugenis, glider Reviewed By: glider Subscribers: emaste, ygribov, llvm-commits, glider, rsmith Differential Revision: http://reviews.llvm.org/D5253 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217971 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-28[UBSan] Temporarily disable checks for stack traces in UBSan reports on DarwinAlexander Potapenko
to make the tests green. Slow stack unwinding is disabled in libsanitizer on Darwin now. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216657 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-22[UBSan] Add support for printing backtraces to all UBSan handlersAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216289 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30Add %run to all lit testsGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207709 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move UBSan test suite under test/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201401 91177308-0d34-0410-b5e6-96231b3b80d8