summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* Change another test I missed in r365724Nico Weber2019-07-111-1/+1
| | | | llvm-svn: 365725
* clang-cl: Remove -O0 optionNico Weber2019-07-1189-121/+121
| | | | | | | | | | | | cl.exe doesn't understand it; there's /Od instead. See also the review thread for r229575. Update lots of compiler-rt tests to use -Od instead of -O0. Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'` Differential Revision: https://reviews.llvm.org/D64506 llvm-svn: 365724
* [sanitizers][windows] FIX: Rtl-Heap Interception and testsMatthew G McGovern2019-07-0914-14/+14
| | | | | | | | | | | | - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927 - adds fixes for ~win and x64 tests > llvm-svn: 365381 llvm-svn: 365424
* [sanitizers][windows] Rtl-Heap Interception and testsMatthew G McGovern2019-07-0922-4/+746
| | | | | | | | | - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927 llvm-svn: 365422
* Revert "[sanitizers][windows] Rtl-Heap Interception and tests"JF Bastien2019-07-0822-746/+4
| | | | | | | | | | | | | | | | | | | | | | | | Causes build failure on clang-ppc64be-linux-lnt: compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~ compilation terminated. [39/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_debugging.cc.o [40/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o /usr/bin/c++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -Icompiler-rt/lib/asan -Iinclude -I/home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/include -Icompiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O2 -UNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -c compiler-rt/lib/asan/asan_malloc_win.cc compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~ llvm-svn: 365384
* [sanitizers][windows] Rtl-Heap Interception and testsMatthew G McGovern2019-07-0822-4/+746
| | | | | | | | | - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927 llvm-svn: 365381
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-2710-14/+14
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591
* [compiler-rt][test] Set shared_libasan_path in test/asan/lit.cfg on SolarisRainer Orth2019-06-261-1/+1
| | | | | | | | | | | | While checking warnings from the Solaris buildbots, I noticed llvm-lit: /opt/llvm-buildbot/home/solaris11-amd64/clang-solaris11-amd64/llvm/projects/compiler-rt/test/asan/lit.cfg:119: warning: %shared_libasan substitution not set but dynamic ASan is available. Fixed as follows. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63761 llvm-svn: 364394
* [asan] Quote the path to the Python exe in case it has spacesReid Kleckner2019-06-211-2/+10
| | | | | | | | | | | | | These days, Python 3 installs itself into Program Files, so it often has spaces. At first, I resisted this, and I reinstalled it globally into C:/Python37, similar to the location used for Python 2.7. But then I updated VS 2019, and it uninstalled my copy of Python and installed a new one inside "C:/Program Files (x86)/Microsoft Visual Studio/". At this point, I gave up and switched to using its built-in version of Python. However, now these tests fail, and have to be made aware of the possibility of spaces in paths. :( llvm-svn: 364077
* Revert r363633 "[CMake] Fix the value of `config.target_cflags` for ↵Hans Wennborg2019-06-191-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-macOS Apple platforms. Attempt #2." This caused Chromium's clang package to stop building, see comment on https://reviews.llvm.org/D61242 for details. > Summary: > The main problem here is that `-*-version_min=` was not being passed to > the compiler when building test cases. This can cause problems when > testing on devices running older OSs because Clang would previously > assume the minimum deployment target is the the latest OS in the SDK > which could be much newer than what the device is running. > > Previously the generated value looked like this: > > `-arch arm64 -isysroot > <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` > > With this change it now looks like: > > `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot > <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` > > This mirrors the setting of `config.target_cflags` on macOS. > > This change is made for ASan, LibFuzzer, TSan, and UBSan. > > To implement this a new `get_test_cflags_for_apple_platform()` function > has been added that when given an Apple platform name and architecture > returns a string containing the C compiler flags to use when building > tests. This also calls a new helper function `is_valid_apple_platform()` > that validates Apple platform names. > > This is the second attempt at landing the patch. The first attempt (r359305) > had to be reverted (r359327) due to a buildbot failure. The problem was > that calling `get_test_cflags_for_apple_platform()` can trigger a CMake > error if the provided architecture is not supported by the current > CMake configuration. Previously, this could be triggered by passing > `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were > generating test configurations for a list of architectures without > checking if the relevant Sanitizer actually supported that architecture. > We now intersect the list of architectures for an Apple platform > with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer > name) to iterate through the correct list of architectures. > > rdar://problem/50124489 > > Reviewers: kubamracek, yln, vsk, juliehockett, phosek > > Subscribers: mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits > > Tags: #llvm, #sanitizers > > Differential Revision: https://reviews.llvm.org/D61242 llvm-svn: 363779
* Disable recently added Darwin symbolization tests for iOS.Dan Liew2019-06-182-0/+2
| | | | | | | | These tests won't necessarily work because the reported modules paths from the device don't match what's on the host and so offline symbolization fails. llvm-svn: 363641
* [NFC] Split `Darwin/asan-symbolize-partial-report-with-module-map.cc`.Dan Liew2019-06-182-20/+42
| | | | | | | Split `Darwin/asan-symbolize-partial-report-with-module-map.cc` into two separate test cases due to them testing slightly different things. llvm-svn: 363640
* [asan_symbolize] Teach `asan_symbolize.py` to symbolicate partially ↵Dan Liew2019-06-181-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | symbolicated ASan reports. Summary: The use case here is to be able symbolicate ASan reports that might be partially symbolicated, in particular where the function name is known but no source location is available. This can be caused by missing debug info. Previously we would only try to symbolicate completely unsymbolicated reports. The code currently contains an unfortunate quirk to handle a darwin specific bug (rdar://problem/49784442) in the way partially symbolicated reports are emitted when the source location is missing. rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: aprantl, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60533 llvm-svn: 363639
* [CMake] Fix the value of `config.target_cflags` for non-macOS Apple ↵Dan Liew2019-06-171-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms. Attempt #2. Summary: The main problem here is that `-*-version_min=` was not being passed to the compiler when building test cases. This can cause problems when testing on devices running older OSs because Clang would previously assume the minimum deployment target is the the latest OS in the SDK which could be much newer than what the device is running. Previously the generated value looked like this: `-arch arm64 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` With this change it now looks like: `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` This mirrors the setting of `config.target_cflags` on macOS. This change is made for ASan, LibFuzzer, TSan, and UBSan. To implement this a new `get_test_cflags_for_apple_platform()` function has been added that when given an Apple platform name and architecture returns a string containing the C compiler flags to use when building tests. This also calls a new helper function `is_valid_apple_platform()` that validates Apple platform names. This is the second attempt at landing the patch. The first attempt (r359305) had to be reverted (r359327) due to a buildbot failure. The problem was that calling `get_test_cflags_for_apple_platform()` can trigger a CMake error if the provided architecture is not supported by the current CMake configuration. Previously, this could be triggered by passing `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were generating test configurations for a list of architectures without checking if the relevant Sanitizer actually supported that architecture. We now intersect the list of architectures for an Apple platform with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to iterate through the correct list of architectures. rdar://problem/50124489 Reviewers: kubamracek, yln, vsk, juliehockett, phosek Subscribers: mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61242 llvm-svn: 363633
* [AddressSanitizer] [Windows] Fix HeapReAlloc and _recalloc bugs in ↵Matthew G McGovern2019-04-292-0/+58
| | | | | | | | | | | asan_malloc_win.cc HeapReAlloc should allow for 0 sized reallocations without freeing the memory block provided by the user. _recalloc previously did not zero new memory after reallocation. https://reviews.llvm.org/D61268 llvm-svn: 359498
* Revert "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple"Dan Liew2019-04-261-9/+2
| | | | | | | | | | | | | | | | | | | | | This reverts commit 1bcdbd68616dc7f8debe126caafef7a7242a0e6b. It's been reported that some bots are failing with this change with CMake error like: ``` CMake Error at /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:177 (message): Unsupported architecture: arm64 Call Stack (most recent call first): /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:216 (get_target_flags_for_arch) /b/s/w/ir/k/llvm-project/compiler-rt/test/tsan/CMakeLists.txt:78 (get_test_cflags_for_apple_platform) ``` I'm reverting the patch now to unbreak builds. I will investigate properly when time permits. rdar://problem/50124489 llvm-svn: 359327
* [asan_symbolize] Teach `asan_symbolize.py` to symbolicate using a module mapDan Liew2019-04-261-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The use case here is to be able get the UUIDs of the modules that need to be symbolicated so that external plugins can see them. This information can be extracted from ASan reports if the `print_module_map` ASan option is enabled. Currently printing of the module map is only implemented on Darwin and so this is effectively a Darwin only feature right now. The module map hooks into symbolization using the new plugin infrastructure. A new hook in `AsanSymbolizerPlugInProxy` (and in `AsanSymbolizerPlugIn`) is also provided to allow external plugins to hook into the module look up process. This will allow external plugins to look up modules with knowledge of their UUID. The new plug-in is currently stored in the `asan_symbolize.py` script. We could potentially move this into a separate file in the future (to reduce clutter) if we can come up with a policy for where to search for plugins that should always get loaded. rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60531 llvm-svn: 359322
* [CMake] Fix the value of `config.target_cflags` for non-macOS AppleDan Liew2019-04-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms. The main problem here is that `-*-version_min=` was not being passed to the compiler when building test cases. This can cause problems when testing on devices running older OSs because Clang would previously assume the minimum deployment target is the the latest OS in the SDK which could be much newer than what the device is running. Previously the generated value looked like this: `-arch arm64 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` With this change it now looks like: `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` This mirrors the setting of `config.target_cflags` on macOS. This change is made for ASan, LibFuzzer, TSan, and UBSan. To implement this a new `get_test_cflags_for_apple_platform()` function has been added that when given an Apple platform name and architecture returns a string containing the C compiler flags to use when building tests. This also calls a new helper function `is_valid_apple_platform()` that validates Apple platform names. rdar://problem/50124489 Differential Revision: https://reviews.llvm.org/D58578 llvm-svn: 359305
* [asan_symbolize] Add a simple plugin architectureDan Liew2019-04-183-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds a simple plugin architecture to `asan_symbolize.py`. The motivation here is that sometimes it's necessary to perform extra work to figure out where binaries with debug symbols can actually be found. For example it might be the case that a remote service needs to be queried for binaries and then copied to the local system. This "extra work" can be extremely site-specific such that adding the code directly into the `asan_symbolize.py` would just clutter the code for a very niche use case. To avoid this, the `asan_symbolize.py` can now load external code via a new `--plugins` command line option. These plugins are loaded before main command line argument parsing so that they can add their own command line options. Right now the only hook into the behaviour of symbolization is the `filter_binary_path()` function which assumes a very similar role to the `binary_name_filter` function that was previously in the code. We can add more hooks as necessary. Code in the `asan_symbolize.py` script does not call plugin code directly. Instead it uses a `AsanSymbolizerPlugInProxy` object. This object * Loads plugins from files. * Manages the lifetime of the plugins. * Provides an interface for calling into plugin functions and handles calling into multiple plugins. To unify the way binary paths are filtered the old `sysroot_path_filter` function (and associated code) has been turned into a simple plugin (`SysRootFilterPlugIn`) that is always loaded. The plugin unloads itself if the `-s` option is not present on the command line. Users should not see any functional change relating to this command line option. Some simple tests are provided to illustrate what plugin code looks like and also to check the functionality continues to work. rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: srhines, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60529 llvm-svn: 358657
* [asan_symbolize] Use proper logging infrastructure.Dan Liew2019-04-083-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The previous logging infrastructure had several problems: * Debugging output was emitted to standard output which is also where the symbolized output would go. Interleaving these two separate bits of information makes inspecting the output difficult and could potentially break tests. * Enabling debugging output requires modifying the script which is not very conveninent. * When debugging it isn't immediately obvious where the output is coming from. This patch uses the Python standard library logging infrastructure which fixes all of the above problems. Logging is controlled using two new options. * `--log-level` - Sets the logging level, default is `info`. * `--log-dest` - Set the logging destination, default is standard error. Some simple test cases for the feature are included. rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60343 llvm-svn: 357951
* [Sanitizer] Make wcrtomb test posix-onlyPavel Labath2019-04-081-0/+3
| | | | | | | | | | | | wcrtomb is not intercepted on windows, so this test fails there. It's not clear to me why we do not intercept this function there (I'll look into that separately), but for now this should at least make the windows sanitizer bot green again (broken by r357889, when I added this test). I also add "UNSUPPORTED: android" as this function is also not intercepted there. llvm-svn: 357892
* [Sanitizer] Fix a possible write to freed memory in the wcrtomb interceptorPavel Labath2019-04-081-0/+13
| | | | | | | | | | | | | | | | | | Summary: r357240 added an interceptor for wctomb, which uses a temporary local buffer to make sure we don't write to unallocated memory. This patch applies the same technique to wcrtomb, and adds some additional tests for this function. Reviewers: vitalybuka, eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59984 llvm-svn: 357889
* Enable `asan/TestCases/Posix/start-deactivated.cc` test for iOS.Dan Liew2019-03-211-1/+0
| | | | | | | | | | | | | | | | | | | Summary: To make this test pass it was necesary to change `iossim_run.py` to propagate the `ASAN_ACTIVATION_OPTIONS` environment variable into the testing environment. rdar://problem/49114807 Reviewers: kubamracek, yln, serge-sans-paille Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D59660 llvm-svn: 356701
* [asan] Disable -Wfortify-source in intentional OOB testsReid Kleckner2019-03-182-4/+4
| | | | | | Needed after r356397 llvm-svn: 356426
* Remove ASan asm instrumentation.Evgeniy Stepanov2019-03-111-33/+0
| | | | | | | | | | | | | | Summary: It is incomplete and has no users AFAIK. Reviewers: pcc, vitalybuka Subscribers: srhines, kubamracek, mgorny, krytarowski, eraman, hiraditya, jdoerfert, #sanitizers, llvm-commits, thakis Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D59154 llvm-svn: 355870
* [sanitizer] Intercept bzero.Evgeniy Stepanov2019-03-041-0/+15
| | | | | | | | | | | | | | | | Summary: Intercept bzero and enable existing __bzero interceptor in Linux. bzero is deprecated but still used occasionally. Reviewers: vitalybuka Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58850 llvm-svn: 355347
* Reland "[compiler-rt] Intercept the bcmp() function."Clement Courbet2019-03-012-2/+20
| | | | | | | Fix test issues on darwin: The REQUIRES for the test should be the same as the guard for whether we intercept bcmp. llvm-svn: 355204
* [Sanitizer] lit test config: Respect existing parallelism_groupJulian Lettner2019-02-281-1/+2
| | | | llvm-svn: 355128
* [hwasan, asan] Intercept vfork.Evgeniy Stepanov2019-02-271-0/+31
| | | | | | | | | | | | | | | Summary: Intercept vfork on arm, aarch64, i386 and x86_64. Reviewers: pcc, vitalybuka Subscribers: kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58533 llvm-svn: 355030
* [Darwin][NFC] Refactor throttling of 64bit sanitizer tests on DarwinJulian Lettner2019-02-271-3/+1
| | | | | | | | | | | | | | | | | | | Underlying condition for throttling is "has large mmap'd regions" (i.e., shadow memory) and not sanitizers in general (e.g., UBSan does not need to be throttled). Rename parallelism group `darwin-64bit-sanitizer` to `shadow-memory` and apply it unconditionally to all tests which require it. We can then have all the Darwin throttling logic in one place in the commen lit config. Throttle sanitizer_common unit tests. Configuration was previously missing from sanitizer_common/Unit/lit.site.cfg. Reviewed by: kubamracek Differential Revision: https://reviews.llvm.org/D58677 llvm-svn: 355018
* Revert "[compiler-rt] Intercept the bcmp() function."Vlad Tsyrklevich2019-02-262-21/+2
| | | | | | | This reverts commits r354851, 354852, 354853 and r354888. They were causing build failures on the android sanitizer bot. llvm-svn: 354906
* [compiler-rt] Disable failing test on darwin during investigation.Clement Courbet2019-02-261-0/+1
| | | | | | | | | | | | | | /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/projects/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc:14:12: error: CHECK: expected string not found in input // CHECK: {{#1.*bcmp}} ^ <stdin>:2:57: note: scanning from here ==34677==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffee93777c4 at pc 0x0001068a7285 bp 0x7ffee9377770 sp 0x7ffee9376ef8 ^ <stdin>:6:20: note: possible intended match here #2 0x106888e77 in main bcmp_test.cc:12 ^ llvm-svn: 354888
* [compiler-rt] disable asan bcmp tests on android.Clement Courbet2019-02-261-0/+1
| | | | | | | | Android does not have bcmp. sanitizer-x86_64-linux-android: run instrumented asan tests [arm/aosp_marlin-userdebug/PI] - stdio llvm-svn: 354853
* [compiler-rt] Intercept the bcmp() function.Clement Courbet2019-02-262-2/+19
| | | | | | | | | | | | | | | | | | | | | Summary: I have not introduced a separate hook for `bcmp()` as I don't think there should be any reason for a sanitizer to treat it differently from `memcmp()`. This is only enabled when building on POSIX with GNU extensions. Context: this is to avoid losing coverage when emitting `bcmp() == 0` instead of `memcmp() == 0` in llvm, see https://reviews.llvm.org/D56593. Reviewers: mgorny, krytarowski, vitalybuka, dvyukov Subscribers: kubamracek, dberris, delcypher, jdoerfert, #sanitizers, llvm-commits, jyknight Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58379 llvm-svn: 354851
* [sanitizer] Re-disable a few tests on android.Evgeniy Stepanov2019-02-264-4/+6
| | | | | | Tests were accidentally enabled r354829. llvm-svn: 354834
* [sanitizer] Remove "-android" from test_arch.Evgeniy Stepanov2019-02-251-7/+1
| | | | | | | | | | | | | | | | | | Summary: ASan and Scudo tests are adding "-android" to test arch. There are no tests that depend on it as far as I can see. If necessary, do this instead: REQUIRES: aarch64-target-arch && android Reviewers: pcc, vitalybuka Subscribers: srhines, kubamracek, mgorny, javed.absar, kristof.beyls, cryptoad, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58532 llvm-svn: 354829
* Revert "[asan] Fix vfork handling.", +1Evgeniy Stepanov2019-02-211-31/+0
| | | | | | Revert r354625, r354627 - multiple build failures. llvm-svn: 354629
* [asan] Fix vfork handling.Evgeniy Stepanov2019-02-211-2/+2
| | | | | | | | __asan_handle_vfork was unpoisoning the wrong part of the stack. Adjust the test to catch this reliably (current failure is non-deterministic). llvm-svn: 354627
* [hwasan,asan] Intercept vfork.Evgeniy Stepanov2019-02-211-0/+31
| | | | | | | | | | | | | | Summary: AArch64 only for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, jdoerfert, #sanitizers, llvm-commits, kcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58313 llvm-svn: 354625
* [Sanitizer] iOS: Pull up parallelism_group handling into common.lit.configJulian Lettner2019-02-151-2/+0
| | | | | | | | | | | | | | | | | | | Serial execution on iOS devices is not specific to sanitizers. We want to throttle all on-device tests. Pull the setting of the parallelism_group up into the common lit configuration file. Rename `darwin-ios-device-sanitizer` to `ios-device`. This group is not specific to sanitizers and (theoretically) independent from the host OS. Note that we don't support running unit tests on-device (there are no configurations generated for that). If that ever changes, we also need this configuration in `unittests/lit.common.unit.cfg`. Reviewers: delcypher Differential Revision: https://reviews.llvm.org/D58209 llvm-svn: 354179
* Explicitly set C++ standard for `Posix/no-fd.cc` ASan test.Dan Liew2019-01-151-1/+1
| | | | | | | | | | | | | | | | | Summary: The test uses `nullptr` which can break running the test if the compiler happens to be using something older than C++11 as the default language standard. Avoid this by explicitly setting the standard. rdar://problem/47253542 Reviewers: eugenis, yln, vitalybuka Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56667 llvm-svn: 351169
* [asan] Add fallback for Thumb after r350139Diana Picus2019-01-141-1/+1
| | | | | | | | | | | | | | This reverts r350806 which marked some tests as UNSUPPORTED on ARM and instead reintroduces the old code path only for Thumb, since that seems to be the only target that broke. It would still be nice to find the root cause of the breakage, but with the branch point for LLVM 8.0 scheduled for next week it's better to put things in a stable state while we investigate. Differential Revision: https://reviews.llvm.org/D56594 llvm-svn: 351040
* [asan] Mark tests as UNSUPPORTED on armDiana Picus2019-01-101-1/+1
| | | | | | | | | | Temporarily mark a couple of tests as UNSUPPORTED until we figure out why they fail on the thumb bots. The failure was introduced in r350139 - Add support for background thread on NetBSD in ASan. llvm-svn: 350806
* [asan] Disable TSD dtor leak unit tests on FreeBSD x86 64David Carlier2019-01-091-0/+2
| | | | | | | | | | | | - Assertion fails in the third iteration. Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56497 llvm-svn: 350744
* [asan] Support running without /procEvgeniy Stepanov2019-01-081-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: vitalybuka, pcc, krytarowski Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D56141 llvm-svn: 350590
* Revert "[asan] Support running without /proc.", +1Evgeniy Stepanov2018-12-281-4/+0
| | | | | | | | | Revert r350104 "[asan] Fix build on windows." Revert r350101 "[asan] Support running without /proc." These changes break Mac build, too. llvm-svn: 350112
* Enable asan_and_llvm_coverage_test.cc for NetBSDKamil Rytarowski2018-12-271-2/+0
| | | | | | LLVM profile is now enabled for this target. llvm-svn: 350106
* [asan] Support running without /proc.Evgeniy Stepanov2018-12-271-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55874 llvm-svn: 350101
* Do not rely on that subject of ErrorAllocTypeMismatch is a heap address.Martin Liska2018-12-273-0/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D54856. llvm-svn: 350085
* Revert "[asan] Disable test on powerpc64be"Vitaly Buka2018-12-201-3/+0
| | | | | | | | Now the test is passing on that bot. Some incremental build issues? This reverts commit e00b5a5229ae02088d9f32a4e328eaa08abaf354. llvm-svn: 349852
OpenPOWER on IntegriCloud