summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] Echo fuzzer output on sigusr tests.Matt Morehouse2019-05-152-2/+2
| | | | | | Improves debuggability when the fuzz target crashes. llvm-svn: 360824
* [libFuzzer] replace string_view with string to fix the bots. This is NFC, ↵Kostya Serebryany2019-05-141-6/+7
| | | | | | just slower. llvm-svn: 360717
* [libFuzzer] #include <string_view>, hopefully should fix the windows build Kostya Serebryany2019-05-141-0/+1
| | | | llvm-svn: 360715
* [libFuzzer] reimplement DFT's collect_data_flow inside libFuzzer so that we ↵Kostya Serebryany2019-05-144-43/+170
| | | | | | don't need external python scripts llvm-svn: 360712
* [GWP-ASan] Initial build files, implementation of PRNG [1].Mitch Phillips2019-05-145-1/+93
| | | | | | | | | | | | | | | | | | Summary: See D60593 for further information. This patch slices off the PRNG implementation and the initial build files for GWP-ASan. Reviewers: vlad.tsyrklevich, morehouse, vitalybuka Reviewed By: morehouse Subscribers: srhines, kubamracek, mgorny, #sanitizers, llvm-commits, cryptoad, eugenis Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61867 llvm-svn: 360710
* [compiler-rt] Fix crtbegin.c compilationShoaib Meenai2019-05-111-4/+4
| | | | | | | We're building with -std=c11 now (as opposed to -std=gnu11), so we can't use GNU extensions and need to spell inline assembly as __asm__. llvm-svn: 360503
* [crt] Use -std=c11 for crtbegin.o/crtend.oPetr Hosek2019-05-102-0/+2
| | | | | | | | | The source uses C11 syntax such as comments and some compilers print warnings without specifying this flag. Differential Revision: https://reviews.llvm.org/D61797 llvm-svn: 360459
* [NFC][TSan][libdispatch] Tiny CMake file cleanupJulian Lettner2019-05-101-2/+1
| | | | llvm-svn: 360453
* Fix some gcc warnings in compiler-rtNico Weber2019-05-103-5/+5
| | | | | | | | - Several "warning: extra ';' [-Wpedantic]" - One "C++ style comments are not allowed in ISO C90 [enabled by default]" in a file that uses C style comments everywhere but in one place llvm-svn: 360430
* [libFuzzer] code refactoring; NFCKostya Serebryany2019-05-105-45/+45
| | | | llvm-svn: 360400
* [libFuzzer] small refactoring in the driver; dummy implementation of ↵Kostya Serebryany2019-05-104-21/+44
| | | | | | collect_data_flow; attempt to fix the windows bot llvm-svn: 360399
* [compiler-rt] Migrate to _zx_clock_get_new/_zx_clock_get_monotonicPetr Hosek2019-05-091-2/+7
| | | | | | | | This is part of the soft-transition to the new _zx_clock_get signature. Differential Revision: https://reviews.llvm.org/D61768 llvm-svn: 360394
* [libFuzzer] Unpoison parameters before calling user callback.Matt Morehouse2019-05-094-1/+37
| | | | | | | | | | | | | | | | | | | | Summary: Fixes an MSan false positive when compiling with -fsanitize=memory,fuzzer. See https://github.com/google/oss-fuzz/issues/2369 for more details. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, metzman, eugenis Tags: #llvm Differential Revision: https://reviews.llvm.org/D61753 llvm-svn: 360390
* [NFC][compiler-rt][builtins] Tidy and match comments for floating point ↵Leonard Chan2019-05-099-102/+94
| | | | | | | | operations Differential Revision: https://reviews.llvm.org/D61762 llvm-svn: 360389
* [TSan][libdispatch] Enable test that supposedly deadlocks on botJulian Lettner2019-05-091-2/+0
| | | | | | | | Re-enable test that was disabled because it deadlocks when running on the bot, but was never enabled again. Can't reproduce deadlock locally so trying to investigate by re-enabling test. llvm-svn: 360388
* [libFuzzer] perform more agressive value profiling in memcmpKostya Serebryany2019-05-092-3/+9
| | | | llvm-svn: 360385
* [MSan] Introduce __msan_unpoison_param().Matt Morehouse2019-05-094-0/+58
| | | | | | | | | | | | | | | | | | | Summary: This allows libFuzzer to unpoison parameter shadow before calling LLVMFuzzerTestOneInput to eliminate the false positives described in https://github.com/google/oss-fuzz/issues/2369. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, metzman, kcc Tags: #llvm Differential Revision: https://reviews.llvm.org/D61751 llvm-svn: 360379
* [libFuzzer] implement -focus_function=auto, to be used with Data Flow TracesKostya Serebryany2019-05-098-12/+297
| | | | llvm-svn: 360378
* [libFuzzer] simplify value-profile-mem.test a little bitKostya Serebryany2019-05-091-1/+2
| | | | llvm-svn: 360372
* [scudo][standalone] Introduce the chunk headerKostya Kortchinsky2019-05-086-3/+249
| | | | | | | | | | | | | | | | | | | | | | Summary: ... and its related functions. The structure and its functionalities are identical to existing ones. The header stores information on a `scudo::Chunk` to be able to detect inconsitencies or potential corruption attempts. It is checksummed for that purpose. Reviewers: morehouse, eugenis, vitalybuka, hctim Reviewed By: vitalybuka Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61654 llvm-svn: 360290
* [libFuzzer] DFT: when dumping coverage, also dump the total number of ↵Kostya Serebryany2019-05-084-24/+46
| | | | | | instrumented blocks in a function; update merge_data_flow.py to merge coverage llvm-svn: 360272
* [compiler-rt] Make builtins test pass when using i386 gcc as host compilerNico Weber2019-05-081-1/+1
| | | | | | | | | | | | | | | | | Just-built-clang is used to compile the test, but the library is built with gcc, so the usual 80-bit FPU vs 32-bit SSE mismatch makes the floating computations not bitwise identical. Fixes PR32910, see there for details. This uses the same technique used in all the other *c3* tests, see in particular mulsc3_test.c. (It might be cleaner to add compareResultCF to fp_test.h to force the floats into 32-bit in memory, but this is the less invasive fix.) Differential Revision: https://reviews.llvm.org/D61684 llvm-svn: 360264
* [libFuzzer] extend the test for data flow tracer and coverage; also ↵Kostya Serebryany2019-05-081-1/+11
| | | | | | hopefully fix it on the bot llvm-svn: 360215
* [libFuzzer] extend the data flow tracer to also produce basic block coverage ↵Kostya Serebryany2019-05-085-41/+116
| | | | | | for every input. An extended test coming in a separte change. llvm-svn: 360213
* Fix build on NetBSD 8.99.38Kamil Rytarowski2019-05-081-0/+2
| | | | | | | | With recent changes the dev/nvmm/nvmm_ioctl.h header is no longer a standalone NVMM header. Disable it until the NVMM operations will stabilize and be included in the ioctl(2) interceptors. llvm-svn: 360212
* [libFuzzer] disable two tests on i386 that are causing timeouts on the botsKostya Serebryany2019-05-082-2/+2
| | | | llvm-svn: 360211
* [compiler-rt] Create install targets for Darwin librariesShoaib Meenai2019-05-073-44/+66
| | | | | | | | | | | Darwin targets were generating CMake install rules but not the corresponding install targets. Centralize the existing install target creation to a function and use that function for both Darwin and non-Darwin builds. Differential Revision: https://reviews.llvm.org/D61541 llvm-svn: 360181
* [scudo][standalone] Introduce the QuarantineKostya Kortchinsky2019-05-075-0/+534
| | | | | | | | | | | | | | | | | | | | | Summary: The Quarantine is used to hold chunks for a little while prior to actually releasing them for potential reuse. The code is pretty much the same as the sanitizer_common one, with additional shuffling of the quarantine batches to decrease predictability of allocation patterns when it is enabled. Reviewers: vitalybuka, eugenis, hctim, morehouse Reviewed By: morehouse Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61385 llvm-svn: 360163
* [libFuzzer] Increase timeouts on fork tests and skip one on aarch64Peter Smith2019-05-073-8/+8
| | | | | | | | | | | | | The tests fork.text, fork.sigusr.test and fork-ubsan.test intermittently fail on the aarch64 buildbots. Input gathered from the fork.sigusr.test implies that when the builder is under load the timeout value is not sufficient. The fork-ubsan.test doesn't have a timeout and I think is not always finding the error after 10000 runs so I've marked it as unsupported for now. Differential Revision: https://reviews.llvm.org/D61449 llvm-svn: 360126
* Add libc++ to link XRay test cases if libc++ is used to build CLANGXing Xue2019-05-062-1/+10
| | | | | | | | | | | | | | Summary: When libc++ is used to build CLANG, its XRay libraries libclang_rt.xray-*.a have dependencies on libc++. Therefore, libc++ is needed to link and run XRay test cases. For Linux -rpath is also needed to specify where to load libc++. This change sets macro LLVM_LIBCXX_USED to 1 if libc++ is actually used in the build. XRay tests then check the flag and add -L<llvm_shlib_dir> -lc++ and -Wl,-rpath=<llvm_shlib_dir> if needed. Reviewers: hubert.reinterpretcast, amyk, dberris, jasonliu, sfertile, EricWF Subscribers: dberris, mgorny, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61016 llvm-svn: 360060
* [Lsan] Disabling explicitally FreeBSDDavid Carlier2019-05-031-1/+1
| | | | | | | | | | | | As it is not implemented upon usage, it just provokes numerous linkage issues so better switch off clearly. Reviewers: vitalybuka, morehouse Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D61484 llvm-svn: 359920
* [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.Evgeniy Stepanov2019-05-031-1/+11
| | | | | | | | | | | | | | | | | Summary: I'm not aware of any platforms where this will work, but the code should at least compile. HWASAN_WITH_INTERCEPTORS=OFF means there is magic in libc that would call __hwasan_thread_enter / __hwasan_thread_exit as appropriate. Reviewers: pcc, winksaville Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61337 llvm-svn: 359914
* Avoid duplicate function aliases on MinGW after SVN r359835Martin Storsjo2019-05-032-4/+6
| | | | | | | On MinGW, the same alias mechanism as for ELF, using __attribute__((__alias__())), is used. llvm-svn: 359865
* [crtbegin] Fix an off-by-1 bug in __do_finiFangrui Song2019-05-031-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D61367 llvm-svn: 359850
* Fix check-builtins on Windows after alias changesReid Kleckner2019-05-023-1/+21
| | | | llvm-svn: 359835
* [compiler-rt] Set the ZX_VMO_RESIZABLE option for zx_vmo_createPetr Hosek2019-05-024-4/+4
| | | | | | | | | | | | | Currently VMO in Zircon create using the zx_vmo_create is resizable by default, but we'll be changing this in the future, requiring an explicit flag to make the VMO resizable. Prepare for this change by passing ZX_VMO_RESIZABLE option to all zx_vmo_create calls that need resizable VMO. Differential Revision: https://reviews.llvm.org/D61450 llvm-svn: 359803
* [libFuzzer] Re-enable libFuzzer on i386 Linux and fix testJonathan Metzman2019-05-022-7/+10
| | | | | | | | | | | | | | | | | | | | | Summary: Re-enable libFuzzer on i386 Linux after it was accidentally disabled. Also disable gc-sections.test on i386 since lld isn't garbage collecting properly with ASAN on i386. Reviewers: morehouse Reviewed By: morehouse Subscribers: srhines, mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61415 llvm-svn: 359802
* Fix for WindowsStephan Bergmann2019-05-021-2/+1
| | | | | | | ...after 5745eccef54ddd3caca278d1d292a88b2281528b "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO" llvm-svn: 359760
* Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFOStephan Bergmann2019-05-027-48/+79
| | | | | | | | | | | | | | | | | | | | | | | | This follows up after b7692bc3e9ad2691fc07261904b88fb15f30696b "[UBSan] Fix isDerivedFromAtOffset on iOS ARM64" fixed the RTTI comparison in isDerivedFromAtOffset on just one platform and then a25a2c7c9a7e1e328a5bd8274d2d86b1fadc4692 "Always compare C++ typeinfo (based on libstdc++ implementation)" extended that fix to more platforms. But there is another RTTI comparison for -fsanitize=function generated in clang's CodeGenFunction::EmitCall as just a pointer comparison. For SANITIZER_NON_UNIQUE_TYPEINFO platforms this needs to be extended to also do string comparison. For that, __ubsan_handle_function_type_mismatch[_abort] takes the two std::type_info pointers as additional parameters now, checks them internally for potential equivalence, and returns without reporting failure if they turn out to be equivalent after all. (NORETURN needed to be dropped from the _abort variant for that.) Also these functions depend on ABI-specific RTTI now, so needed to be moved from plain UBSAN_SOURCES (ubsan_handlers.h/cc) to UBSAN_CXXABI_SOURCES (ubsan_handlers_cxx.h/cc), but as -fsanitize=function is only supported in C++ mode that's not a problem. Differential Revision: https://reviews.llvm.org/D60760 llvm-svn: 359759
* [compiler-rt][tests] Propagate COMPILER_RT_UNITTEST_LINK_FLAGSHubert Tong2019-05-016-4/+13
| | | | | | | | | | | | | | | | | | | | `COMPILER_RT_UNITTEST_LINK_FLAGS` is dropped in many places, unlike `COMPILER_RT_UNITTEST_CFLAGS`. This patch attempts to remove that inconsistency. Previously reviewed as part of D58951. Reviewers: sfertile, peter.smith, pzheng, phosek, Hahnfeld, nemanjai, jasonliu Reviewed By: sfertile Subscribers: jsji, kubamracek, dberris, mgorny, delcypher, jdoerfert, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60143 llvm-svn: 359733
* [tsan] Fix and re-enable user_malloc.cc testVitaly Buka2019-05-011-9/+9
| | | | | | | | | | | | | | Summary: no_sanitize_thread is not enough as it still puts some tsan instrumentation Reviewers: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61393 llvm-svn: 359731
* [sanitizer][NFC] Remove unneeded SizeClassAllocatorLocalCacheVitaly Buka2019-05-013-29/+17
| | | | llvm-svn: 359729
* [sanitizer][NFC] Add const/static into a couple of methodsVitaly Buka2019-05-012-4/+4
| | | | llvm-svn: 359728
* [Sanitizer] Reland "Cleanup INTERCEPT_FUNCTION macro"Julian Lettner2019-05-016-40/+45
| | | | | | | | | | | | | | | | | | | | | | On Linux both version of the INTERCEPT_FUNCTION macro now return true when interception was successful. Adapt and cleanup some usages. Also note that `&(func) == &WRAP(func)` is a link-time property, but we do a runtime check. Tested on Linux and macOS. Previous attempt reverted by: 5642c3feb03d020dc06a62e3dc54f3206a97a391 This attempt to bring order to the interceptor macro goes the other direction and aligns the Linux implementation with the way things are done on Windows. Reviewed By: vitalybuka, rnk Differential Revision: https://reviews.llvm.org/D61358 llvm-svn: 359725
* [sanitizer][NFC] Set LargeMmapAllocator type from PrimaryAllocatorVitaly Buka2019-05-019-45/+21
| | | | | | | | | | | | | | They need to have same AddressSpaceView and MapUnmapCallback. Reviewers: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61168 llvm-svn: 359719
* [scudo][NFC] Remove unneeded template from scudo::CombinedAllocatorVitaly Buka2019-05-012-4/+7
| | | | | | | | | | | | | | Reviewers: cryptoad, eugenis Reviewed By: cryptoad Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61162 llvm-svn: 359718
* [sanitizer][NFC] Get type of AllocatorCache from CombinedAllocatorVitaly Buka2019-05-0111-56/+28
| | | | | | | | | | | | | | Reviewers: eugenis, cryptoad, kcc Reviewed By: kcc Subscribers: kcc, kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61155 llvm-svn: 359715
* [sanitizer] Implement reallocarray.Evgeniy Stepanov2019-05-0130-9/+215
| | | | | | | | | | | | | | | | Summary: It's a cross of calloc and realloc. Sanitizers implement calloc-like check for size overflow. Reviewers: vitalybuka, kcc Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61108 llvm-svn: 359708
* [libFuzzer] Add --dump-input-on-failure to help diagnose AArch64 failuresPeter Smith2019-05-012-6/+6
| | | | | | | | | | | | | | The fork-siguser.test and fork.test intermittently fail on the AArch64 buildbot. Unfortunately these failures are not reproducible on a similar machine and seem to fail when the machines are under load. Before suggesting the tests be marked unsupported for AArch64 we'd like to see if we can get some more information about the failures to see if it helps us reproduce. This patch adds --dump-input-on-failure to the FileCheck commands to see if we can get some more information about the failures. Differential Revision: https://reviews.llvm.org/D61315 llvm-svn: 359675
* [compiler-rt] Use correct spelling of the -Wno-pedantic variablePetr Hosek2019-05-011-1/+1
| | | | | | | This addresses the issue introduced in r359646 which is causing sanitizer bots to fail. llvm-svn: 359659
OpenPOWER on IntegriCloud