summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/asan/tests to .cppNico Weber2019-08-011-15/+23
| | | | | | Like r367463, but for asan/tests llvm-svn: 367559
* Enable compiler-rt on SPARCRainer Orth2019-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward: - Add 32 and 64-bit sparc to compiler-rt - lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc) There's one issue of note: many asan tests fail to compile on Solaris/SPARC: fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported. Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc, which doesn't have the problem above and works just fine. With this patch, sparcv9-sun-solaris2.11 test results are pretty good: Failing Tests (9): Builtins-sparc-sunos :: divtc3_test.c Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c Builtins-sparcv9-sunos :: divtc3_test.c [...] UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal patches either currently in review or about to be submitted. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D40943 llvm-svn: 365880
* Remove ASan asm instrumentation.Evgeniy Stepanov2019-03-111-5/+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
* [asan] Remove flags for clang-cl before it supported EHReid Kleckner2018-10-311-5/+0
| | | | | | | Also remove -Wno-undefined-inline, which needed to work around PR19898, which was fixed. llvm-svn: 345677
* [sanitizer] Split Symbolizer/StackTraces from core RTSanitizerCommonKostya Kortchinsky2018-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Host symbolizer & stacktraces related code in their own RT: `RTSanitizerCommonSymbolizer`, which is "libcdep" by nature. Symbolizer & stacktraces specific code that used to live in common files is moved to a new file `sanitizer_symbolizer_report.cc` as is. The purpose of this is the enforce a separation between code that relies on symbolization and code that doesn't. This saves the inclusion of spurious code due to the interface functions with default visibility, and the extra data associated. The following sanitizers makefiles were modified & tested locally: - dfsan: doesn't require the new symbolizer RT - esan: requires it - hwasan: requires it - lsan: requires it - msan: requires it - safestack: doesn't require it - xray: doesn't require it - tsan: requires it - ubsan: requires it - ubsan_minimal: doesn't require it - scudo: requires it (but not for Fuchsia that has a minimal runtime) This was tested locally on Linux, Android, Fuchsia. Reviewers: alekseyshl, eugenis, dberris, kubamracek, vitalybuka, dvyukov, mcgrathr Reviewed By: alekseyshl, vitalybuka Subscribers: srhines, kubamracek, mgorny, krytarowski, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D45457 llvm-svn: 330131
* [sanitizer] Split coverage into separate RT in sanitizer_commonKostya Kortchinsky2018-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `sanitizer_common`'s coverage support is fairly well separated, and libcdep by default. Several sanitizers don't make use of coverage, and as far as I can tell do no benefit from the extra dependencies pulled in by the coverage public interface functions. The following sanitizers call `InitializeCoverage` explicitely: MSan, ASan, LSan, HWAsan, UBSan. On top of this, any sanitizer bundling RTUBSan should add the coverage RT as well: ASan, Scudo, UBSan, CFI (diag), TSan, MSan, HWAsan. So in the end the following have no need: DFSan, ESan, CFI, SafeStack (nolibc anyway), XRay, and the upcoming Scudo minimal runtime. I tested this with all the sanitizers check-* with gcc & clang, and in standalone on Linux & Android, and there was no issue. I couldn't test this on Mac, Fuchsia, BSDs, & Windows for lack of an environment, so adding a bunch of people for additional scrunity. I couldn't test HWAsan either. Reviewers: eugenis, vitalybuka, alekseyshl, flowerhack, kubamracek, dberris, rnk, krytarowski Reviewed By: vitalybuka, alekseyshl, flowerhack, dberris Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44701 llvm-svn: 328204
* [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274)Kamil Rytarowski2018-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch (on top of the previous two (https://reviews.llvm.org/D40898 and https://reviews.llvm.org/D40899) complete the compiler-rt side of the the Solaris sanitizer port. It contains the following sets of changes: * For the time being, the port is for 32-bit x86 only, so reject the various tests on x86_64. * When compiling as C++, <setjmp.h> resp. <iso/setjmp_iso.h> only declares _setjmp and _longjmp inside namespace std. * MAP_FILE is a Windows feature. While e.g. Linux <sys/mman.h> provides a no-op compat define, Solaris does not. * test/asan/TestCases/Posix/coverage.cc was initially failing like this: /vol/gcc/src/llvm/llvm/local/projects/compiler-rt/lib/sanitizer_common/scripts/sancov.py: 4 files merged; 2 PCs total rm: cannot remove '/var/gcc/llvm/local/projects/compiler-rt/test/asan/I386SunOSConfig/TestCases/Posix/Output/coverage': Invalid argument Further digging revealed that the rm was trying to remove the running test's working directory which failed as observed. cd'ing out of the dir before let the test pass. * Two tests needed a declaration of alloca. I've now copied the existing code from test/asan/TestCases/alloca_constant_size.cc, but it may be more profitable and maintainable to have a common testsuite header where such code is collected. * Similarly, Solaris' printf %p format doesn't include the leading 0x. * In test/asan/TestCases/malloc-no-intercept.c, I had to undef __EXTENSIONS__ (predefined by clang for no apparent reason) to avoid conflicting declarations for memalign. * test/ubsan/TestCases/Float/cast-overflow.cpp has different platform dependent ways to define BYTE_ORDER and friends. Why not just use __BYTE_ORDER__ and friends as predefined by clang and gcc? Patch by Rainer Orth. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, mgorny, krytarowski, fedor.sergeev, JDevlieghere, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40900 llvm-svn: 322635
* [asan] Add CMake hook to override shadow scale in compiler_rtWalter Lee2017-11-131-0/+2
| | | | | | | | | | | | Allow user to override shadow scale in compiler_rt by passing -DCOMPILER_RT_ASAN_SHADOW_SCALE=n to CMake. Propagate the override shadow scale value via a compiler define to compiler-rt and asan tests. Tests will use the define to partially disable unsupported tests. Set "-mllvm -asan-mapping-scale=<n>" for compiler_rt tests. Differential Revision: https://reviews.llvm.org/D39469 llvm-svn: 318038
* [cmake] [asan] Remove unnecessary gtest dep from dynamic testsMichal Gorny2017-10-121-1/+1
| | | | | | | | | | | | | | | | Remove the redundant dependency on 'gtest' target from the dynamic tests in non-MSVC environment. The tests reuse compiled objects from ASAN_INST_TEST_OBJECTS, and therefore they have been built against gtest already. This both fixes the spurious dependency on 'gtest' target that breaks stand-alone builds, and brings the dynamic tests more in line with regular tests which do not pass this dependency to add_compiler_rt_test() through generate_compiler_rt_tests(). Differential Revision: https://reviews.llvm.org/D38840 llvm-svn: 315620
* Shorten filenames of tests (-with-calls to -calls)Kamil Rytarowski2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD's 8(beta) versions of kernel functions to retrieve program name (vnode to path translator) and process memory map have internal limit of processing filenames with maximum of 31 characters. Filenames like Asan-x86_64-with-calls-Noinst-Test break this limit and affect tests. Rename "-with-calls" to "-calls". This changes fixes all issues for the Address Sanitizer test target (check-asan) on the current NetBSD support caused by long filenames. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, filcab, fjricci, kcc Reviewed By: vitalybuka Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37149 llvm-svn: 311966
* [sanitizers CMake] NFC Refactor the logic for compiling and generating testsGeorge Karpenkov2017-08-151-113/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | into a function. Most CMake configuration under compiler-rt/lib/*/tests have almost-the-same-but-not-quite functions of the form add_X_[unit]tests for compiling and running the tests. Much of the logic is duplicated with minor variations across different sub-folders. This can harm productivity for multiple reasons: For newcomers, resulting CMake files are very large, hard to understand, and hide the intention of the code. Changes for enabling certain architectures end up being unnecessarily large, as they get duplicated across multiple folders. Adding new sub-projects requires more effort than it should, as a developer has to again copy-n-paste the configuration, and it's not even clear from which sub-project it should be copy-n-pasted. With this change the logic of compile-and-generate-a-set-of-tests is extracted into a function, which hopefully makes writing and reading CMake much easier. Differential Revision: https://reviews.llvm.org/D36116 llvm-svn: 310971
* [CMake compiler-rt] NFC: Minor CMake refactoring.George Karpenkov2017-08-151-6/+1
| | | | | | | | | Detect ObjC files in `clang_compile` and pass an appropriate flag to a compiler, also change `clang_compile` to a function. Differential Revision: https://reviews.llvm.org/D36727 llvm-svn: 310945
* [compiler-rt CMake] CMake refactoring: create directories in helper func.George Karpenkov2017-08-151-5/+0
| | | | | | | | | Change macro to a function, move creating test directory into `add_compiler_rt_test`. Differential Revision: https://reviews.llvm.org/D36724 llvm-svn: 310943
* [sanitizer tests CMake] Factor out CMake logic for compiling sanitizer testsGeorge Karpenkov2017-07-281-21/+15
| | | | | | | | | | | Currently there's a large amount of CMake logic duplication for compiling sanitizer tests. If we add more sanitizers, the duplication will get even worse. This change factors out common compilation commands into a macro available to all sanitizers. llvm-svn: 309405
* [sanitizers] Sanitizer tests CMake clean up: try #2George Karpenkov2017-07-281-30/+4
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309341
* Revert "[sanitizers] Sanitizer tests CMake clean up"George Karpenkov2017-07-271-4/+30
| | | | | | | | This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a. Fails on some bots, reverting until I can fix it. llvm-svn: 309318
* [sanitizers] Sanitizer tests CMake clean upGeorge Karpenkov2017-07-271-30/+4
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309306
* Revert "[sancov] moving sancov rt to sancov/ directory"Mike Aizatsky2017-01-121-3/+0
| | | | | | | | This reverts commit https://reviews.llvm.org/rL291734 Reason: mac breakage http://lab.llvm.org:8080/green//job/clang-stage1-configure-RA_build/28798/consoleFull#1657087648e9a0fee5-ebcc-4238-a641-c5aa112c323e llvm-svn: 291736
* [sancov] moving sancov rt to sancov/ directoryMike Aizatsky2017-01-121-0/+3
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28541 llvm-svn: 291734
* Make cmake link flag naming consistentFrancis Ricci2017-01-101-33/+33
| | | | | | | | | | | | | | | | | | | Summary: The build system was inconsistent in its naming conventions for link flags. This patch changes all uses of LINKFLAGS to LINK_FLAGS, for consistency with cmake's LINK_FLAGS property. This patch should make it easier to search the source code for uses of link flags, as well as providing the benefit of improved style and consistency. Reviewers: compnerd, beanz Subscribers: kubabrecka, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28506 llvm-svn: 291539
* Enable weak hooks on darwinFrancis Ricci2017-01-091-0/+5
| | | | | | | | | | | | | | | | Summary: By default, darwin requires a definition for weak interface functions at link time. Adding the '-U' link flag with each weak function allows these weak interface functions to be used without definitions, which mirrors behavior on linux and windows. Reviewers: compnerd, eugenis Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28203 llvm-svn: 291417
* [asan/win] Fix incremental linking vs. global registrationReid Kleckner2016-11-231-2/+0
| | | | | | | | | | The MSVC incremental linker pads every global out to 256 bytes in case it changes size after an incremental link. So, skip over null entries in the DSO-wide asan globals array. This only works if the global padding size is divisible by the size of the asan global object, so add some defensive CHECKs. llvm-svn: 287780
* [asan] Create a .ASAN$G(A-Z) section for global registrationReid Kleckner2016-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The expectation is that new instrumented code will add global variable metadata to the .ASAN$GL section, and we will use this new code to iterate over it. This technique seems to break when using incremental linking, which seems to align every global to a 256 byte boundary. Presumably this is so that it can incrementally cope with global changing size. Clang already passes -incremental:no as a linker flag when you invoke it to do the link step. The two tests added for this feature will fail until the LLVM instrumentation change in D26770 lands, so they are marked XFAIL for now. Reviewers: pcc, kcc, mehdi_amini, kubabrecka Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26771 llvm-svn: 287246
* [asan] Add more dynamic CRT mode testsReid Kleckner2016-11-021-1/+18
| | | | | | | | | | | | Only tests using %clang_cl_asan were using the dynamic CRT before this. The unit tests and lit tests using %clangxx_asan were using the static CRT. Many cross-platform tests fail with the dynamic CRT, so I had to add win32-(static|dynamic)-asan lit features. Also deletes some redundant tests in TestCases/Windows that started failing with this switch. llvm-svn: 285821
* [asan] Stop appending -lm, -pthread and other linker options on Darwin for ↵Kuba Brecka2016-09-231-6/+7
| | | | | | | | | | ASan unit tests On Darwin, -lm, -pthread and others are implied. -pthread currently produces a warning (compiler option unused). Differential Revision: https://reviews.llvm.org/D24698 llvm-svn: 282260
* [asan] Add __asan_set_shadow_*Vitaly Buka2016-08-181-0/+1
| | | | | | | | | | | | | | | | Summary: We are poisoning small allocas using store instruction from instrumented code. For larger allocas we'd like to insert function calls instead of multiple stores. PR27453 Reviewers: kcc, eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D23616 llvm-svn: 279019
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-7/+8
| | | | | | | | | | | | | | | | | | | | Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 llvm-svn: 275111
* [compiler-rt] Fix cmake to propagate debug info to runtime unittestsEtienne Bergeron2016-07-011-2/+2
| | | | | | | | | | | | | | Summary: The debug information is not present due to a mis named variabl in the cmake files. Reviewers: rnk Subscribers: kubabrecka, wang0109, llvm-commits, chrisha Differential Revision: http://reviews.llvm.org/D21938 llvm-svn: 274386
* tab to whitespacesEtienne Bergeron2016-07-011-2/+2
| | | | llvm-svn: 274382
* [compiler-rt] Fix passing debug information to unittest.Etienne Bergeron2016-06-291-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: On windows, the debug information was not present in the unittest executables, which make them hard to debug. The Sanitizer Unittests are compiled with a local clang build. The link pass is also done by calling clang. This pass is adding the appropriate flags to bring the right debug information to these executables. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D21838 llvm-svn: 274153
* [compiler-rt] Fix multi-configuration output pathsEtienne Bergeron2016-05-161-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When using a multi-configuration build (i.e. MSVC) the output path where libraries are dropped is incorrect. Example: ``` C:\src\llvm\examples>d:\src\llvm\build\Release\bin\clang-cl.exe -fsanitize=address test.cc LINK : fatal error LNK1181: cannot open input file 'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\clang_rt.asan-i386.lib' ``` The dropped executable path contains the configuration 'Release': ``` 'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\Release\clang_rt.asan-i386.lib' ``` The variable 'RUNTIME_OUTPUT_DIRECTORY' is used to specify the output directory. But CMAKE is appending the current configuration (i.e. Debug, Release). see: https://cmake.org/cmake/help/v3.0/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html ``` "Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory." ``` To avoid this problem, the configuration specific variable must be set: 'RUNTIME_OUTPUT_DIRECTORY_DEBUG', 'RUNTIME_OUTPUT_DIRECTORY_RELEASE', and so on. Reviewers: ddunbar, chapuni, rnk Subscribers: kubabrecka, llvm-commits Differential Revision: http://reviews.llvm.org/D20261 llvm-svn: 269658
* Move -fms-compatibility-version=19 into target cflagsReid Kleckner2016-03-221-5/+0
| | | | | | | This reduces cflags duplication and allows us to build sanitizer_common/tests with clang and the VS 2015 STL. llvm-svn: 264017
* [asan] Pass -fms-compatibility-version=19 with VS 2015Reid Kleckner2016-03-211-0/+5
| | | | | | | This resolves errors about char16_t and char32_t when compiling 2015 STL headers with clang. llvm-svn: 263973
* Fix the cross compilation of unit tests. NFC (second attempt)Sumanth Gundapaneni2016-01-141-1/+6
| | | | | | | | | | | | | | | | With COMPILER_RT_INCLUDE_TESTS turned ON and in a cross compiling environment, the unit tests fail to link. This patch does the following changes >Rename COMPILER_RT_TEST_CFLAGS to COMPILER_RT_UNITTEST_CFLAGS to reflect the way it's used. >Add COMPILER_RT_TEST_COMPILER_CFLAGS to COMPILER_RT_UNITTEST_CFLAGS so that cross-compiler would be able to build/compile the unit tests >Add COMPILER_RT_UNITTEST_LINKFLAGS to COMPILER_RT_UNITTEST_CFLAGS so that cross-compiler would be able to link the unit tests (if needed) Differential Revision: http://reviews.llvm.org/D16165 llvm-svn: 257783
* Revert r257686 "With COMPILER_RT_INCLUDE_TESTS turned ON and in a cross ↵Hans Wennborg2016-01-131-6/+1
| | | | | | | | | | | | | | | compiling" This broke the build. For example, from http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/1191/steps/cmake%20stage%201/logs/stdio: -- Compiler-RT supported architectures: aarch64 CMake Error at projects/compiler-rt/cmake/Modules/AddCompilerRT.cmake:170 (string): string sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): projects/compiler-rt/lib/CMakeLists.txt:4 (include) llvm-svn: 257694
* With COMPILER_RT_INCLUDE_TESTS turned ON and in a cross compilingSumanth Gundapaneni2016-01-131-1/+6
| | | | | | | | | | | | | | | environment, the unit tests fail to link. This patch does the following changes >Rename COMPILER_RT_TEST_CFLAGS to COMPILER_RT_UNITTEST_CFLAGS to reflect the way it's used. >Add COMPILER_RT_TEST_COMPILER_CFLAGS to COMPILER_RT_UNITTEST_CFLAGS so that cross-compiler would be able to build/compile the unit tests >Add COMPILER_RT_UNITTEST_LINKFLAGS to COMPILER_RT_UNITTEST_CFLAGS so that cross-compiler would be able to link the unit tests (if needed) Differential Revision:http://reviews.llvm.org/D15082 llvm-svn: 257686
* [CMake] Unify build rules for sanitizer_common for Apple and non-Apple ↵Alexey Samsonov2015-08-271-0/+1
| | | | | | | | | platforms. Additionally, link safestack runtime on OS X with nolibc version of sanitizer_common runtime, as we do on Linux. llvm-svn: 246227
* [CMake] Add OBJECT_LIBS option to add_compiler_rt_runtime, and refactored ↵Chris Bieneman2015-08-261-1/+1
| | | | | | | | | | | | | | asan call site to use it. Summary: This is one more step to allow us to eliminate platform-specific code from the library CMakeLists files. Subsequent patches will refactor all call sites to use this and other new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12339 llvm-svn: 246047
* [CMake] Fixing r245581 based on feedback from Filcab.Chris Bieneman2015-08-201-3/+0
| | | | llvm-svn: 245582
* [CMake] Fix building unit tests on DarwinChris Bieneman2015-08-201-1/+8
| | | | | | | | | | | | | | | | Summary: There are a number of issues with unit tests on Darwin. These patches address the following: * Unit tests should be passed -arch (-m32/-m64 isn't sufficient) * Unit tests should be passed ${DARWIN_osx_CFLAGS} because they're being built for OS X * Test architectures should be filtered based on base system capabilities (i.e. don't try running x86_64h tests on pre-haswell hardware). Reviewers: bogner, filcab, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12174 llvm-svn: 245580
* [asan] Only link liblog on Android when it exists.Evgeniy Stepanov2015-07-241-1/+1
| | | | | | With r242975, liblog is only used on certain older platforms. llvm-svn: 243139
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Use CMake's cmake_parse_arguments() instead. It's called in a slightly different way, but supports all our use cases. It's in CMake 2.8.8, which is our minimum supported version. CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc): http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments Since I was already changing these calls, I changed ARCH and LIB into ARCHS and LIBS to make it more clear that they're lists of arguments. Reviewers: eugenis, samsonov, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10529 llvm-svn: 240120
* [asan] Fix build of AsanNoinstTest on Android.Evgeniy Stepanov2015-06-081-0/+2
| | | | | | Some of the asan-ubsan build changes were not replicated in the android branch in CMakeLists. llvm-svn: 239320
* Add descriptive names to sanitizer entries in /proc/self/maps. Helps debugging.Evgeniy Stepanov2015-05-291-0/+1
| | | | | | | | | | | | | | | | | | This is done by creating a named shared memory region, unlinking it and setting up a private (i.e. copy-on-write) mapping of that instead of a regular anonymous mapping. I've experimented with regular (sparse) files, but they can not be scaled to the size of MSan shadow mapping, at least on Linux/X86_64 and ext3 fs. Controlled by a common flag, decorate_proc_maps, disabled by default. This patch has a few shortcomings: * not all mappings are annotated, especially in TSan. * our handling of memset() of shadow via mmap() puts small anonymous mappings inside larger named mappings, which looks ugly and can, in theory, hit the mapping number limit. llvm-svn: 238621
* Disable exceptions for clang-compiled unittest code on WindowsReid Kleckner2015-05-011-0/+5
| | | | llvm-svn: 236357
* [UBSan] Embed UBSan into ASan runtime (compiler-rt part).Alexey Samsonov2015-04-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the way we use ASan and UBSan together. Instead of keeping two separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on a platform, all UBSan sources are just compiled into dummy empty object files. UBSan initialization code (e.g. flag parsing) is directly called from ASan initialization, so we are able to enforce correct initialization order. This mirrors the approach we already use for ASan+LSan. This change doesn't modify the way we use standalone UBSan. Test Plan: regression test suite Reviewers: kubabrecka, zaks.anna, rsmith, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8646 llvm-svn: 233861
* [compiler-rt] OS X: Update the CMake and Make builds to explicitely use ↵Kuba Brecka2015-01-291-0/+5
| | | | | | | | libc++, mmacosx-version-min and SDKs In both CMake and Makefiles, we are inconsistent about the use of libstdc++ vs. libc++, SDKs and minimum deployment targets for OS X. Let's fix the detection of SDKs, and let's explicitely set that we link against libc++ and mmacosx-version-min is 10.7. llvm-svn: 227509
* [sanitizer] Flag parser rewrite.Evgeniy Stepanov2015-01-151-1/+2
| | | | | | | The new parser is a lot stricter about syntax, reports unrecognized flags, and will make it easier to implemented some of the planned features. llvm-svn: 226169
* [ASan] Always build shared ASan runtime on Linux.Alexey Samsonov2014-12-171-11/+18
| | | | | | | | | | | | | | | | | This commit changes the strategy for building shared ASan runtime and the way we test it: - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now always build shared ASan runtime (it is the default on Android, Windows and Mac, and not the default on Linux and FreeBSD). - Platforms, which use static runtime by default now have "check-asan-dynamic" testsuite. This testsuite contains instrumented unit tests, and ASan lit tests, and runs them with shared ASan runtime. This testsuite is *not* a part of "check-asan" and *not* a part of "check-all", as adding 1000 more test cases, which duplicate existing ones is costly. However, you're welcome to add this command to your buildbot. llvm-svn: 224470
* [CMake] Detect if -Wfoo is supported instead of -Wno-foo, as GCC ↵Alexey Samsonov2014-11-131-1/+1
| | | | | | occasionally silently discards unknown -Wno-foo flags. llvm-svn: 221925
OpenPOWER on IntegriCloud