summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
...
* [Msan] Fix unit test linkage issue on FreeBSDDavid Carlier2018-09-111-1/+1
| | | | | | | | | | | | Fix typical relocation linkage issue. Reviwewers: dim, emaste Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D51681 llvm-svn: 341924
* [ASan] [Windows] Remove const from _msize function declaration parameterMartin Storsjo2018-09-111-1/+1
| | | | | | | | | This function isn't declared with a const parameter anywhere; neither in MSVC (neither in ucrt or in older msvcrt versions) nor in mingw-w64. Differential Revision: https://reviews.llvm.org/D51876 llvm-svn: 341903
* [hwasan] Re-enable print-memory-usage-android test.Evgeniy Stepanov2018-09-101-3/+6
| | | | | | | The problem was not in a non-rooted device, but in tagged local variable address passed to a system call, see comments in the code. llvm-svn: 341875
* [Windows] Include BaseTsd.h with lowercaseMartin Storsjo2018-09-101-1/+1
| | | | | | | | | | This fixes building on a case sensitive filesystem with mingw-w64 headers, where all headers are lowercase. This header actually also is named with a lowercase name in the Windows SDK as well. Differential Revision: https://reviews.llvm.org/D51877 llvm-svn: 341857
* [hwasan] rename two .cc tests into .cKostya Serebryany2018-09-082-6/+6
| | | | llvm-svn: 341739
* [hwasan] Disable print-memory-usage-android test.Evgeniy Stepanov2018-09-081-0/+5
| | | | | | Requires a rooted device => fails on sanitizer-x86_64-linux-android bot. llvm-svn: 341738
* Switch to using a reserved identifier for this internal compiler-rt function.Richard Smith2018-09-082-7/+7
| | | | llvm-svn: 341736
* [hwasan] Export memory stats through /proc/$PID/maps.Evgeniy Stepanov2018-09-085-7/+59
| | | | | | | Adds a line to /proc/$PID/maps with more or less up-to-date memory stats of the process. llvm-svn: 341735
* [XRay] XRAY_NEVER_INSTRUMENT more functions, consolidate allocatorsDean Michael Berris2018-09-075-101/+144
| | | | | | | | | | | | | | | | | | | | | | Summary: In this change we apply `XRAY_NEVER_INSTRUMENT` to more functions in the profiling implementation to ensure that these never get instrumented if the compiler used to build the library is capable of doing XRay instrumentation. We also consolidate all the allocators into a single header (xray_allocator.h) which sidestep the use of the internal allocator implementation in sanitizer_common. This addresses more cases mentioned in llvm.org/PR38577. Reviewers: mboerger, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51776 llvm-svn: 341647
* [MSan] Define %clang_kmsan for KMSAN testsAlexander Potapenko2018-09-071-0/+6
| | | | llvm-svn: 341638
* [libfuzzer] Enable trace-malloc-unballanced.test on Windows.Jonathan Metzman2018-09-071-5/+7
| | | | | | | | | | | | | | | | | Summary: Enables trace-malloc-unbalanced.test on Windows, fixing two problems it had with Windows before. The first fix is specifying python instead of relying on a script's shebang since they can't be used on Windows. The second fix is making the regex tolerate windows' implementation of the "%p" format string. Reviewers: Dor1s Reviewed By: Dor1s Subscribers: morehouse Differential Revision: https://reviews.llvm.org/D51760 llvm-svn: 341632
* [hwasan] relax the rint-memory-usage.c test furtherKostya Serebryany2018-09-071-5/+5
| | | | llvm-svn: 341625
* [libfuzzer] Use cl driver mode for tests and enable another test on WindowsJonathan Metzman2018-09-072-7/+11
| | | | | | | | | | | | | | | | | | | Summary: When targeting MSVC: compile using clang's cl driver mode (this is needed for libfuzzer's exit_on_src_pos feature). Don't use -lstdc++ when linking, it isn't needed and causes a warning. On Windows: Fix exit_on_src_pos.test by making sure debug info isn't overwritten during compilation of second binary by using .exe extension. Reviewers: morehouse Reviewed By: morehouse Subscribers: aprantl, JDevlieghere Differential Revision: https://reviews.llvm.org/D51757 llvm-svn: 341622
* [hwasan] make the print-memory-usage.c less agressive: do not assume that ↵Kostya Serebryany2018-09-071-3/+4
| | | | | | malloc can't happen before main llvm-svn: 341615
* [hwasan] Fix malloc overflow detection.Evgeniy Stepanov2018-09-072-7/+89
| | | | | | | | | Check size limit before rounding up, otherwise malloc((size_t)-1) would happily allocate 0 bytes. Steal a nice test case from scudo. llvm-svn: 341612
* [hwasan] change the thread list so that main_thread can also be removedKostya Serebryany2018-09-072-8/+12
| | | | llvm-svn: 341610
* [hwasan] Remove allocator interceptors.Evgeniy Stepanov2018-09-063-93/+93
| | | | | | | | | | | | | | | | | | Summary: When building without COMPILER_RT_HWASAN_WITH_INTERCEPTORS, skip interceptors for malloc/free/etc and only export their versions with __sanitizer_ prefix. Also remove a hack in mallinfo() interceptor that does not apply to hwasan. Reviewers: kcc Subscribers: kubamracek, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D51711 llvm-svn: 341598
* [hwasan] fix pthread_exitKostya Serebryany2018-09-062-1/+6
| | | | llvm-svn: 341594
* [hwasan] introduce __hwasan_print_memory_usageKostya Serebryany2018-09-069-7/+133
| | | | llvm-svn: 341592
* [libfuzzer] Correct typo in comment (test commit).Jonathan Metzman2018-09-061-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D51739 llvm-svn: 341569
* [libfuzzer] Fix fuzzer-oom.test on windows and reenable it.Max Moroz2018-09-061-10/+13
| | | | | | | | | | | | | | Summary: Patch by Jonathan Metzman (@metzman). Reviewers: Dor1s, morehouse Reviewed By: Dor1s Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D51735 llvm-svn: 341562
* [MSan] store origins for variadic function parameters in ↵Alexander Potapenko2018-09-062-0/+66
| | | | | | | | | | | | | | | | | __msan_va_arg_origin_tls Add the __msan_va_arg_origin_tls TLS array to keep the origins for variadic function parameters. Change the instrumentation pass to store parameter origins in this array. This is a reland of r341528. test/msan/vararg.cc doesn't work on Mips, PPC and AArch64 (because this patch doesn't touch them), XFAIL these arches. Also turned out Clang crashed on i80 vararg arguments because of incorrect origin type returned by getOriginPtrForVAArgument() - fixed it and added a test. llvm-svn: 341554
* [MSan] revert r341528 to unbreak the botsAlexander Potapenko2018-09-062-61/+0
| | | | llvm-svn: 341541
* ARM: wrap call to __clzsi2 so that the name is correct on MachO.Tim Northover2018-09-061-1/+1
| | | | | | | | MachO symbols are prefixed with an extra '_' (that's 3 in total for this function), so assembly calls have to go through a wrapper to insert any prefix needed. llvm-svn: 341540
* [MSan] store origins for variadic function parameters in ↵Alexander Potapenko2018-09-062-0/+61
| | | | | | | | | | __msan_va_arg_origin_tls Add the __msan_va_arg_origin_tls TLS array to keep the origins for variadic function parameters. Change the instrumentation pass to store parameter origins in this array. llvm-svn: 341528
* [libfuzzer] Temporarily disable unittests failing on Windows.Max Moroz2018-09-064-1/+4
| | | | | | | | | | | | | | | | Summary: Patch by Jonathan Metzman (@metzman). Reviewers: morehouse, Dor1s Reviewed By: Dor1s Subscribers: kcc, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D51712 llvm-svn: 341514
* [hwasan] when verbose_threads==1, print the memory usage per threadKostya Serebryany2018-09-053-1/+11
| | | | llvm-svn: 341507
* [hwasan] simplify the code, NFCKostya Serebryany2018-09-054-21/+8
| | | | llvm-svn: 341501
* [hwasan] Don't handle signals on Android.Evgeniy Stepanov2018-09-051-0/+11
| | | | | | | | | | Sigtrap is used for error reporting, but all other signals are better left for the platform. In particular, sanitizer signal handlers do not dump registers or memory which makes debugging harder for no good reason. llvm-svn: 341500
* [libfuzzer] Replace memmem with strstr.Matt Morehouse2018-09-052-4/+3
| | | | | | | | | | | | | | | | Summary: Memmem is not available on Windows. Patch By: metzman Reviewers: morehouse Reviewed By: morehouse Subscribers: george.karpenkov, morehouse Differential Revision: https://reviews.llvm.org/D51692 llvm-svn: 341495
* [hwasan] deflake a test Kostya Serebryany2018-09-051-2/+2
| | | | llvm-svn: 341480
* Enable symbolize-deadlock.test on WindowsMax Moroz2018-09-052-3/+0
| | | | | | | | | | | | | | | | | | | Summary: Remove unneeded #include of <unistd.h> from SymbolizeDeadlock.cpp to enable compilation on Windows and enable symbolize-deadlock.test on Windows. Patch by Jonathan Metzman (@metzman). Reviewers: Dor1s Reviewed By: Dor1s Subscribers: kcc, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D51685 llvm-svn: 341473
* [Xray] Darwin providing defined value for weak symbols to fix linkage issueDavid Carlier2018-09-051-0/+9
| | | | | | - Temporary hack to make the buildbot failure stop on Darwin. llvm-svn: 341445
* Add glibc_prereq to platform limits mmsghdrBrian Cain2018-09-051-4/+5
| | | | | | | | | sendmmsg requires glibc >= 2.14. Fixes PR38589. Review: https://reviews.llvm.org/D51538 llvm-svn: 341442
* [hwasan] revert r341435 as it breaks the bot on aarch64Kostya Serebryany2018-09-051-11/+7
| | | | llvm-svn: 341441
* [hwasan] fix colored outputKostya Serebryany2018-09-051-0/+1
| | | | llvm-svn: 341440
* [hwasan] print thread IDs when reporting a bug (also had to fix ↵Kostya Serebryany2018-09-056-36/+80
| | | | | | pthread_create on Linux) llvm-svn: 341438
* [hwasan] use real TLS on linux to store the current thread -- this way we ↵Kostya Serebryany2018-09-051-7/+11
| | | | | | can call t->Destroy in __hwasan_thread_exit, same as on Android llvm-svn: 341435
* [hwasan] simplify the code, NFCKostya Serebryany2018-09-054-16/+8
| | | | llvm-svn: 341432
* [hwasan] remove stale Thread:: data members. While doing so noticed that ↵Kostya Serebryany2018-09-045-14/+14
| | | | | | GetThreadStackAndTls was always called with 'at_initialization=true', fixed that. llvm-svn: 341431
* [hwasan] add a unique id to a thread and add debug prints for thread ↵Kostya Serebryany2018-09-044-1/+24
| | | | | | creation/destruction llvm-svn: 341428
* [sanitizer] optimize internal_memset for the most performance critical case ↵Kostya Serebryany2018-09-041-0/+12
| | | | | | (16-byte-aligned) llvm-svn: 341420
* [libFuzzer] Enable tests on WindowsMatt Morehouse2018-09-0429-29/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enable tests on Windows and make check-fuzzer pass on it. Make check-fuzzer pass on Windows by fixing libFuzzer, fixing tests, and by disabling tests on Windows. Most of these are disabled temporarily as support for the tests and the features they test will be added incrementally. Other tests will not be enabled since they require things that are not on Windows (eg: afl_driver tests). Every test that was explicitly disabled on Windows has a comment explaining why (unless obvious like merge-posix.test). The lit.cfg file was modified to support running tests on windows. fuzzer-dirs.test was fixed by making the Windows implementation print the same error message as the posix version. merge-control-file.test was fixed by making the test binary end with the ".exe" extension (on all platforms). Patch By: metzman Reviewers: morehouse Reviewed By: morehouse Subscribers: srhines, mgorny Differential Revision: https://reviews.llvm.org/D51549 llvm-svn: 341385
* [TSan] Update assembly test again.Matt Morehouse2018-09-041-4/+4
| | | | | | Previous commit incorrectly updated the read1 case. llvm-svn: 341384
* [TSan] Update assembly code check.Matt Morehouse2018-09-041-2/+2
| | | | | | | The new assembly makes our benchmark faster, so it should be safe to update the check. llvm-svn: 341381
* [asan] Clean up some confusing code inDan Liew2018-09-031-4/+1
| | | | | | | | | | | | | | `test/asan/TestCases/Darwin/segv_read_write.c` * The `fd` arg passed to `mmap()` should be `-1`. It is not defined what passing `0` does on Darwin. * The comment about the shadow memory doesn't make any sense to me, so I'm removing it. Differential Revision: https://reviews.llvm.org/D44579 llvm-svn: 341307
* [UBSan] Add CMake and lit support for configuring and running UBSanDan Liew2018-09-033-0/+69
| | | | | | | | | | | | | tests for ios, watchos, tvos, and their simulator counterparts. This commit does not make the tests actually pass. This will be handled in later commits. rdar://problem/41126835 Differential Revision: https://reviews.llvm.org/D51270 llvm-svn: 341306
* Give a better error message when trying to run the iossim tests and ↵Dan Liew2018-09-031-1/+5
| | | | | | | | | | | | | | `SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER` is not set in the environment. Summary: Give a better error message when trying to run the iossim tests and `SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER` is not set in the environment. Reviewers: kubamracek, george.karpenkov Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51272 llvm-svn: 341300
* [UBSan] Propagate `UBSAN_OPTIONS` environment variable when running ios ↵Dan Liew2018-09-031-1/+1
| | | | | | | | | | | | | | simulator tests. rdar://problem/41126835 Reviewers: kubamracek, vsk, george.karpenkov Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51273 llvm-svn: 341299
* [UBSan] Add missing `%run` prefixes to Pointer tests.Dan Liew2018-09-032-4/+4
| | | | | | | | | | | | Summary: rdar://problem/41126835 Reviewers: vsk, kubamracek Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51271 llvm-svn: 341298
OpenPOWER on IntegriCloud