summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Simplify checks in allow_user_segv.ccVitaly Buka2017-09-151-6/+6
| | | | llvm-svn: 313342
* [lsan] Disable clang-format on few RUN: statementsVitaly Buka2017-09-153-1/+12
| | | | llvm-svn: 313321
* Revert "[mips] Fix sem_init_glibc test for MIPS."Simon Dardis2017-09-141-5/+3
| | | | | | | | | | | The commit did not fix the failing test and instead exposed an inconsistency between lsan and (t|m|a)san. I'm reverting the patch as it causes more failures and the original patch had a '||' instead of '&&', which meant that an N32 build of test would have be incorrect w.r.t. __HAVE_64B_ATOMICS for glibc. This reverts commit r313248. llvm-svn: 313291
* [mips] Fix sem_init_glibc test for MIPS.Simon Dardis2017-09-141-3/+5
| | | | | | | | | | | | | | | glibc changed the implementation of semaphores for glibc 2.21 requiring some target specific changes for this compiler-rt test. Modify the test to cope with MIPS64 and do some future/correctness work by tying the define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc. Contributions from Nitesh Jain. Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D37829 llvm-svn: 313248
* [sanitizer] Mark allow_user_segv as XFAIL instead of UNSUPPORTEDVitaly Buka2017-09-141-4/+4
| | | | llvm-svn: 313241
* [compiler-rt] Add test for not fully implemented dump_registersVitaly Buka2017-09-131-0/+20
| | | | | | | | | | Reviewers: eugenis, alekseyshl Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D37765 llvm-svn: 313120
* [compiler-rt] Move dump_instruction_bytes and dump_registers into ↵Vitaly Buka2017-09-131-0/+21
| | | | | | | | | | | | | | sanitizer_common Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37766 llvm-svn: 313117
* [ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with ↵Vitaly Buka2017-09-111-1/+0
| | | | | | | | | | | | | | other sanitizers Summary: Other sanitizers include __sanitizer_print_stack_trace into stack trace. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37657 llvm-svn: 312954
* [ubsan] Save binary name before parsing optionsVitaly Buka2017-09-111-1/+0
| | | | | | | | | | | | Summary: To parser "include" we may need to do binary name substitution. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37658 llvm-svn: 312953
* [ubsan] Enable UBsan in sanitizer_common testsVitaly Buka2017-09-0925-12/+32
| | | | | | | | | | | | | | Summary: Failing tests just marked as UNSUPPORTED or XFAIL. Some of them can be easily supported, but I'll do this in separate patches. Reviewers: eugenis, alekseyshl Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37630 llvm-svn: 312860
* [compiler-rt] Move allow_user_segv.cc into sanitizer_commonVitaly Buka2017-09-091-0/+92
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D37537 llvm-svn: 312859
* Finalize ASAN/NetBSDKamil Rytarowski2017-08-301-1/+1
| | | | | | | | | | | | | | | | | | | Summary: This revision contains various cleanups. Sponsored by <The NetBSD Foundation> Reviewers: kcc, vitalybuka, joerg, eugenis Reviewed By: kcc Subscribers: emaste, srhines, llvm-commits, kubamracek, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37244 llvm-svn: 312188
* Reland r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311924
* Revert r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-271-1/+1
| | | | | | | The required change in clang is being reverted because of the Android build bot failure. llvm-svn: 311859
* [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311842
* [sanitizer-coverage] extend fsanitize-coverage=pc-table with flags for every PCKostya Serebryany2017-08-251-5/+12
| | | | llvm-svn: 311794
* [SanitizerCoverage] Add stack depth tracing instrumentation.Matt Morehouse2017-08-181-0/+32
| | | | | | | | | | | | | | | | | | | | | | Summary: Augment SanitizerCoverage to insert maximum stack depth tracing for use by libFuzzer. The new instrumentation is enabled by the flag -fsanitize-coverage=stack-depth and is compatible with the existing trace-pc-guard coverage. The user must also declare the following global variable in their code: thread_local uintptr_t __sancov_lowest_stack https://bugs.llvm.org/show_bug.cgi?id=33857 Reviewers: vitalybuka, kcc Reviewed By: vitalybuka Subscribers: kubamracek, hiraditya, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D36839 llvm-svn: 311186
* [sanitizer-coverage] add a run-time test for ↵Kostya Serebryany2017-07-281-2/+15
| | | | | | -fsanitize-coverage=inline-8bit-counters,pc-table llvm-svn: 309351
* Revert "[compiler-rt] Include thread ID into sanitizers logs"Vitaly Buka2017-07-251-23/+0
| | | | | | | | This improvement introduce additional dependencies on sandboxed environments. This reverts commit r308637. llvm-svn: 308984
* Splitting out test for Darwin for print-stack-trace:George Karpenkov2017-07-242-0/+21
| | | | | | | New default symbolizer can not symbolize inlined function which appear under -O3. llvm-svn: 308925
* [compiler-rt] Include thread ID into sanitizers logsVitaly Buka2017-07-201-0/+23
| | | | | | | | | | Reviewers: kcc, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D35654 llvm-svn: 308637
* [tsan] Add support for running TSan tests on iOS simulator and devicesKuba Mracek2017-07-101-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D35157 llvm-svn: 307537
* [sanitizer-coverage] Stop marking this test as unsupported on DarwinJustin Bogner2017-06-211-1/+1
| | | | | | The bug that was causing this to fail was fixed in r305429. llvm-svn: 305942
* Mark a sancov test as unsupported on x86_64h-darwinVedant Kumar2017-06-101-1/+1
| | | | | | Failing bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/6891 llvm-svn: 305133
* [sanitizer-coverage] one more flavor of coverage: ↵Kostya Serebryany2017-06-081-0/+23
| | | | | | -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. Reapplying revisions 304630, 304631, 304632, 304673, see PR33308 llvm-svn: 305026
* Revert r304285, r304297.Evgeniy Stepanov2017-06-051-118/+0
| | | | | | | | | | | r304285 - [sanitizer] Avoid possible deadlock in child process after fork r304297 - [sanitizer] Trying to fix MAC buildbots after r304285 These changes create deadlock when Tcl calls pthread_create from a pthread_atfork child handler. More info in the original review at https://reviews.llvm.org/D33325 llvm-svn: 304735
* Revert "[sanitizer-coverage] test for -fsanitize-coverage=inline-8bit-counters"Renato Golin2017-06-051-23/+0
| | | | | | | | | | | | | Revert "Mark sancov test as unsupported on Darwin" Revert "[LSan] Detect dynamic loader by its base address." This reverts commit r304633. This reverts commit r304673. This reverts commit r304632. Those commit have broken LOTS of ARM/AArch64 bots for two days. llvm-svn: 304699
* Mark sancov test as unsupported on DarwinVedant Kumar2017-06-041-1/+1
| | | | | | | | | | This test has been failing on all Darwin bots since it was introduced: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/32111 fatal error: error in backend: Global variable '__sancov_gen_' has an invalid section specifier '__DATA,__sancov_counters': mach-o section specifier requires a section whose length is between 1 and 16 characters. Target: x86_64-apple-darwin15.6.0 llvm-svn: 304673
* [sanitizer-coverage] test for -fsanitize-coverage=inline-8bit-countersKostya Serebryany2017-06-031-0/+23
| | | | llvm-svn: 304632
* [sanitizer-coverage] remove stale code (old coverage); compiler-rt part Kostya Serebryany2017-05-313-5/+5
| | | | llvm-svn: 304318
* [sanitizer] Avoid possible deadlock in child process after forkMaxim Ostapenko2017-05-311-0/+118
| | | | | | | | | | | | | | This patch addresses https://github.com/google/sanitizers/issues/774. When we fork a multi-threaded process it's possible to deadlock if some thread acquired StackDepot or allocator internal lock just before fork. In this case the lock will never be released in child process causing deadlock on following memory alloc/dealloc routine. While calling alloc/dealloc routines after multi-threaded fork is not allowed, most of modern allocators (Glibc, tcmalloc, jemalloc) are actually fork safe. Let's do the same for sanitizers except TSan that has complex locking rules. Differential Revision: https://reviews.llvm.org/D33325 llvm-svn: 304285
* [compiler-rt] Replace allow_user_segv_handler=0 with kHandleSignalExclusiveVitaly Buka2017-05-251-1/+1
| | | | | | | | | | | | | | Summary: allow_user_segv_handler had confusing name did not allow to control behavior for signals separately. Reviewers: eugenis, alekseyshl, kcc Subscribers: llvm-commits, dberris, kubamracek Differential Revision: https://reviews.llvm.org/D33371 llvm-svn: 303941
* [PowerPC] Fix test case sem_init_glibc.cc for powerpc64beBill Seurer2017-05-251-1/+5
| | | | | | | This test case fails on powerpc64be with older glibcs because of the glibc version test. llvm-svn: 303863
* [mips] XFAIL getpwnam_r_invalid_user.cc testSimon Dardis2017-05-101-0/+2
| | | | | | XFAIL this test while we investigate the root cause. llvm-svn: 302635
* [mips] Remove XFAIL from sanitizer_coverage_no_prune.ccSimon Dardis2017-05-091-1/+1
| | | | | | Test is XPASSing, so remove the XFAIL marker. llvm-svn: 302567
* [SystemZ] Remove XFAIL on sanitizer_coverage_no_prune.ccUlrich Weigand2017-05-091-1/+1
| | | | | | This test case works fine on SystemZ as well. llvm-svn: 302563
* [powerpc] Remove XFAIL for sanitizer_coverage_no_prune.cc on powerpc64Bill Seurer2017-05-081-1/+1
| | | | | | This test case works fine on powerpc64 (both BE and LE). llvm-svn: 302430
* [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a ↵Kostya Serebryany2017-05-051-0/+15
| | | | | | hidden -mllvm flag. compiler-rt part (test only). llvm-svn: 302321
* [asan] print the 'unexpected format specifier in printf interceptor' warning ↵Kostya Serebryany2017-05-031-0/+12
| | | | | | just once (came up in https://github.com/google/oss-fuzz/pull/562). Not touching a similar scanf warning -- for some reason it does not fire for me. llvm-svn: 302064
* [sanitizer] Intercept mcheck and mprobe on LinuxMaxim Ostapenko2017-05-031-0/+42
| | | | | | | | | This patch addresses https://github.com/google/sanitizers/issues/804. Users can use mcheck and mprobe functions to verify heap state so we should intercept them to avoid breakage of valid code. Differential Revision: https://reviews.llvm.org/D32589 llvm-svn: 302001
* [sanitizer-coverage] add a deprecation note for the old sanitizer-coverage; ↵Kostya Serebryany2017-05-021-6/+0
| | | | | | remove a TODO printf llvm-svn: 301889
* [asan] Add a compilation wrapper that codesigns shared libraries to support ↵Kuba Mracek2017-04-281-0/+32
| | | | | | | | | | iOS simulator testing Tests that run on the iOS simulator require the dlopen'd dylibs are codesigned. This patch adds the "iossim_compile.py" wrapper that codesigns any produces dylib. Differential Revision: https://reviews.llvm.org/D32561 llvm-svn: 301617
* Follow-up for r301443: The python scrips need to be executable.Kuba Mracek2017-04-262-0/+0
| | | | llvm-svn: 301448
* [asan] Add support for running lit tests in the iOS SimulatorKuba Mracek2017-04-262-0/+34
| | | | | | | | This patch adds a basic support for running the ASan lit test suite against an iOS Simulator. This is done by generating more lit.site.cfg configurations into subdirectories such as IOSSimI386Config and IOSSimX86_64Config. These test suites are not added into "check-all" or into "check-asan", they have to be run manually. Differential Revision: https://reviews.llvm.org/D31477 llvm-svn: 301443
* [sanitizer] Define lsan-x86 in tests for both i386 and i686.Evgeniy Stepanov2017-04-181-1/+1
| | | | llvm-svn: 300601
* Use 0-padding for i386 and arm print format specifiersFrancis Ricci2017-04-121-1/+1
| | | | | | | | | | | | | | Summary: This is used for the other architectures in print_address, but is missing from i386 and arm. Reviewers: m.ostapenko, spetrovic Subscribers: aemerson, rengolin, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31977 llvm-svn: 300065
* [msan] fix iconv interceptor. before the fix the interceptor failed to mark ↵Kostya Serebryany2017-04-121-0/+28
| | | | | | memory as initialized if iconv returned -1. Found in a hard way while fuzzing libxml2 :( llvm-svn: 300010
* Reapply "Enable LSan for arm Linux"Maxim Ostapenko2017-04-111-1/+1
| | | | | | This patch reapplies r299923 with typo fixed in BLX macros. llvm-svn: 299948
* Revert r299923, it doesn't build in bootstrap builds.Nico Weber2017-04-111-1/+1
| | | | | | | | | | | | | | | FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_linux.cc.o lib/sanitizer_common/sanitizer_linux.cc:1340:24: error: invalid instruction BLX(ip) ^ lib/sanitizer_common/sanitizer_linux.cc:1313:19: note: expanded from macro 'BLX' # define BLX(R) "mov lr, pc; bx" #R "\n" ^ <inline asm>:6:13: note: instantiated into assembly here mov lr, pc; bxip ^~~~ llvm-svn: 299943
* [lsan] Enable LSan for arm LinuxMaxim Ostapenko2017-04-111-1/+1
| | | | | | | | This patch enables LSan for arm Linux. Differential Revision: https://reviews.llvm.org/D29586 llvm-svn: 299923
OpenPOWER on IntegriCloud