summaryrefslogtreecommitdiff
path: root/test/tsan/map32bit.cc
AgeCommit message (Collapse)Author
2017-10-25Add NetBSD improvements in sanitizersKamil Rytarowski
Summary: Changes: * Add initial msan stub support. * Handle NetBSD specific pthread_setname_np(3). * NetBSD supports __attribute__((tls_model("initial-exec"))), define it in SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE. * Add ReExec() specific bits for NetBSD. * Simplify code and add syscall64 and syscall_ptr for !NetBSD. * Correct bunch of syscall wrappers for NetBSD. * Disable test/tsan/map32bit on NetBSD as not applicable. * Port test/tsan/strerror_r to a POSIX-compliant OSes. * Disable __libc_stack_end on NetBSD. * Disable ReadNullSepFileToArray() on NetBSD. * Define struct_ElfW_Phdr_sz, detected missing symbol by msan. * Change type of __sanitizer_FILE from void to char. This helps to reuse this type as an array. Long term it will be properly implemented along with SANITIZER_HAS_STRUCT_FILE setting to 1. * Add initial NetBSD support in lib/tsan/go/buildgo.sh. * Correct referencing stdout and stderr in tsan_interceptors.cc on NetBSD. * Document NetBSD x86_64 specific virtual memory layout in tsan_platform.h. * Port tests/rtl/tsan_test_util_posix.cc to NetBSD. * Enable NetBSD tests in test/msan/lit.cfg. * Enable NetBSD tests in test/tsan/lit.cfg. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, kcc, dvyukov Reviewed By: dvyukov Subscribers: #sanitizers, llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39124 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30[mips][tsan] XFAIL on every MIPS platform an x86_64-specific test.Vasileios Kalintiris
The map32bit.cc test uses the MMAP_32BIT flag which is supported only on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-09[sanitizers] Make it possible to XFAIL on the effective target, not just the ↵Daniel Sanders
default. Summary: The triple is not the right thing to XFAIL on since LIT only sees the default triple and not the effective triple chosen by any -target option in the RUN directives. This discrepancy is shown in the table below: Default Triple | Options | XFAIL | LIT's expected result | Desired expectation =================+===================================+========+=======================+==================== mips-linux-gnu | -target mips-linux-gnu | | Pass | Pass mips-linux-gnu | -target mips64-linux-gnu -mabi=64 | | Pass | Pass mips-linux-gnu | -target mips-linux-gnu | mips | Fail | Fail mips-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips | Fail | Fail/Pass* (debatable**) mips-linux-gnu | -target mips-linux-gnu | mips- | Fail | Fail mips-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips- | Fail | Pass* mips-linux-gnu | -target mips-linux-gnu | mips64 | Pass | Pass mips-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips64 | Pass | Fail* mips64-linux-gnu | -target mips-linux-gnu | | Pass | Pass mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | | Pass | Pass mips64-linux-gnu | -target mips-linux-gnu | mips | Fail | Fail* mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips | Fail | Fail/Pass (debatable**) mips64-linux-gnu | -target mips-linux-gnu | mips- | Pass | Fail* mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips- | Pass | Pass mips64-linux-gnu | -target mips-linux-gnu | mips64 | Fail | Pass* mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips64 | Fail | Fail x64_64-linux-gnu | -target i386-linux-gnu | | Pass | Pass x64_64-linux-gnu | -target x86_64-linux-gnu | | Pass | Pass x64_64-linux-gnu | -target i386-linux-gnu | i386 | Pass | Fail* x64_64-linux-gnu | -target x86_64-linux-gnu | i386 | Pass | Pass x64_64-linux-gnu | -target i386-linux-gnu | x86_64 | Fail | Pass x64_64-linux-gnu | -target x86_64-linux-gnu | x86_64 | Fail | Fail* * These all differ from LIT's current behaviour. ** People's expectations vary depending on whether they know that LIT does a substring match on the default triple or think it's an exact match on an architecture. This patch adds "target-is-${target_arch}" to the available features list and updates the mips XFAIL's to use them. XFAIL'ing on these features will correctly account for the target being tested. Making the table: Options | XFAIL | LIT's expected result ==================================+==================+====================== -target mips-linux-gnu | | Pass -target mips64-linux-gnu -mabi=64 | | Pass -target mips-linux-gnu | target-is-mips | Fail -target mips64-linux-gnu -mabi=64 | target-is-mips | Pass -target mips-linux-gnu | target-is-mips64 | Pass -target mips64-linux-gnu -mabi=64 | target-is-mips64 | Fail -target i386-linux-gnu | | Pass -target x86_64-linux-gnu | | Pass -target i386-linux-gnu | target-is-i386 | Fail -target x86_64-linux-gnu | target-is-i386 | Pass -target i386-linux-gnu | target-is-x86_64 | Pass -target x86_64-linux-gnu | target-is-x86_64 | Fail Reviewers: probinson Subscribers: probinson, kubabrecka, llvm-commits, samsonov Differential Revision: https://reviews.llvm.org/D22802 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08[PPC64, TSAN] LLVM basic enablement of thread sanitizer for PPC64 (BE and LE)Bill Schmidt
This patch is by Simone Atzeni with portions by Adhemerval Zanella. This contains the LLVM patches to enable the thread sanitizer for PPC64, both big- and little-endian. Two different virtual memory sizes are supported: Old kernels use a 44-bit address space, while newer kernels require a 46-bit address space. There are two companion patches that will be added shortly. There is a Clang patch to actually turn on the use of the thread sanitizer for PPC64. There is also a patch that I wrote to provide interceptor support for setjmp/longjmp on PPC64. Patch discussion at reviews.llvm.org/D12841. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255057 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30[tsan] Change comments referencing code.google.com to point to GitHub ↵Kuba Brecka
instead. NFC. Changing comments that have references to code.google.com to point to GitHub instead, because the current links are not redirected properly (they instead redirect to different issues, mostly ASan). NFC. Differential Revision: http://reviews.llvm.org/D15053 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28[tsan] Mark a few more tests with "UNSUPPORTED: darwin"Kuba Brecka
There's a few more lit tests that require features not available on OS X (MAP_32BIT, pthread_setname_np), let's mark them with "UNSUPPORTED: darwin". Differential Revision: http://reviews.llvm.org/D14923 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254225 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05[tsan] Enable tsan for aarch64Adhemerval Zanella
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244055 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20[TSan][MIPS64] Fix few more test cases for MIPS64Mohit K. Bhakkad
Patch by Sagar Thakur Reviewers: dvyukov, samsonov, kcc. Subscribers: dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7290 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230002 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21tsan: remove sleeps from testsDmitry Vyukov
Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226659 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24tsan: support mmap(MAP_32BIT)Dmitry Vyukov
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220571 91177308-0d34-0410-b5e6-96231b3b80d8