summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
...
* try to fix bots more after r367562Nico Weber2019-08-011-6/+6
| | | | llvm-svn: 367587
* try to fix bots after r367562Nico Weber2019-08-011-3/+3
| | | | llvm-svn: 367586
* compiler-rt: Call a generated c++ file in hwasan .cpp instead of .ccNico Weber2019-08-011-3/+3
| | | | llvm-svn: 367572
* compiler-rt: Rename .cc file in lib/scudo/standalone/tests to .cppNico Weber2019-08-0123-46/+49
| | | | | | | | Like r367463, but for scudo/standalone/tests. With this, all files in compiler-rt/lib have extension cpp. llvm-svn: 367569
* compiler-rt: Rename .cc file in lib/scudo/standalone to .cppNico Weber2019-08-0115-33/+37
| | | | | | Like r367463, but for scudo/standalone. llvm-svn: 367568
* compiler-rt: Rename .cc file in lib/tsan/{benchmarks,dd,go} to .cppNico Weber2019-08-0112-13/+13
| | | | | | | | | Like r367463, but for tsan/{benchmarks,dd,go}. The files benchmarks aren't referenced in the build anywhere and where added in 2012 with the comment "no Makefiles yet". llvm-svn: 367567
* compiler-rt: Rename .cc file in lib/tsan/tests/{rtl,unit} to .cppNico Weber2019-08-0122-38/+43
| | | | | | Like r367463, but for tsan/tests/{rtl,unit}. llvm-svn: 367566
* compiler-rt: Rename .cc file in lib/tsan/rtl to .cppNico Weber2019-08-0142-98/+104
| | | | | | Like r367463, but for tsan/rtl. llvm-svn: 367564
* compiler-rt: Rename .cc file in lib/msan/tests to .cppNico Weber2019-08-014-6/+11
| | | | | | Like r367463, but for msan/tests. llvm-svn: 367563
* compiler-rt: Rename .cc file in lib/msan to .cppNico Weber2019-08-0113-29/+30
| | | | | | Like r367463, but for msan. llvm-svn: 367562
* compiler-rt: Rename .cc file in lib/lsan to .cppNico Weber2019-08-0113-24/+27
| | | | | | Like r367463, but for lsan. llvm-svn: 367561
* compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cppNico Weber2019-08-016-9/+11
| | | | | | Like r367463, but for interception/tests and safestack. llvm-svn: 367560
* compiler-rt: Rename .cc file in lib/asan/tests to .cppNico Weber2019-08-0116-28/+36
| | | | | | Like r367463, but for asan/tests llvm-svn: 367559
* compiler-rt: Rename .cc file in lib/asan to .cppNico Weber2019-08-0146-100/+106
| | | | | | Like r367463, but for asan. llvm-svn: 367558
* Try to heal bots more after r367551Nico Weber2019-08-011-1/+1
| | | | llvm-svn: 367555
* Try to heal bots after r367551Nico Weber2019-08-011-1/+1
| | | | llvm-svn: 367552
* compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cppNico Weber2019-08-0110-13/+15
| | | | | | Like r367463, but for dfsan, stats, ubsan_minimal. llvm-svn: 367551
* compiler-rt: Rename .cc file in lib/xray/tests/unit to .cppNico Weber2019-08-0110-17/+19
| | | | | | Like r367463, but for xray/texts/unit. llvm-svn: 367550
* compiler-rt: Rename .cc file in lib/xray to .cppNico Weber2019-08-0121-49/+63
| | | | | | Like r367463, but for xray. llvm-svn: 367546
* compiler-rt: Try to appease lint script.Nico Weber2019-07-312-9/+7
| | | | | | | | | | | | | A bot complains: /b/sanitizer-x86_64-linux-autoconf/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/malloc_stress_transfer_test.cpp:2: Streams are highly discouraged. [readability/streams] [3] /b/sanitizer-x86_64-linux-autoconf/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp:11: Streams are highly discouraged. [readability/streams] [3] lib/CMakeFiles/SanitizerLintCheck.dir/build.make:57: recipe for target 'lib/CMakeFiles/SanitizerLintCheck' failed I do not know why this apparently wasn't a problem when the files had extension .cc. llvm-svn: 367493
* Attempt to heal bots after r367467Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367473
* compiler-rt: Rename .cc file in lib/sanitizer_common/symbolizer to .cppNico Weber2019-07-313-3/+3
| | | | llvm-svn: 367471
* Attempt to heal tsan bot after r367463Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367469
* compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cppNico Weber2019-07-3135-68/+71
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $(basename $f) . ; done and manually updated references to renamed files found by that. llvm-svn: 367467
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-3184-210/+213
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* Attempt to heal bots after r367456Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367462
* compiler-rt: Rename .cc file in lib/profile to .cppNico Weber2019-07-313-2/+2
| | | | | | | | See https://reviews.llvm.org/D58620 for discussion. Note how the comment in the file already said ".cpp" :) llvm-svn: 367460
* compiler-rt: Rename .cc files in lib/interception to .cpp.Nico Weber2019-07-315-8/+8
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367456
* compiler-rt: Rename .cc files in lib/ubsan to .cpp.Nico Weber2019-07-3119-38/+37
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452
* gn build: Add build files for compiler-rt/lib/profileNico Weber2019-07-311-3/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D65518 llvm-svn: 367450
* gn build: Fix redundant object files in builtin lib.Nico Weber2019-07-311-18/+0
| | | | | | | | | | | | | | | | | | | | | | compiler-rt's builtin library has generic implementations of many functions, and then per-arch optimized implementations of some. In the CMake build, both filter_builtin_sources() and an explicit loop at the end of the build file (see D37166) filter out the generic versions if a per-arch file is present. The GN build wasn't doing this filtering. Just do the filtering manually and explicitly, instead of being clever. While here, also remove files from the mingw/arm build that are redundantly listed after D39938 / r318139 (both from the CMake and the GN build). While here, also fix a target_os -> target_cpu typo. Differential Revision: https://reviews.llvm.org/D65512 llvm-svn: 367448
* [Sanitizer][ASAN][MSAN] Fix infinite recursion on FreeBSDAlexander Richardson2019-07-316-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: MSAN was broken on FreeBSD by https://reviews.llvm.org/D55703: after this change accesses to the key variable call __tls_get_addr, which is intercepted. The interceptor then calls GetCurrentThread which calls MsanTSDGet which again calls __tls_get_addr, etc... Using the default implementation in the SANITIZER_FREEBSD case fixes MSAN for me. I then applied the same change to ASAN (introduced in https://reviews.llvm.org/D55596) but that did not work yet. In the ASAN case, we get infinite recursion again during initialization, this time because calling pthread_key_create() early on results in infinite recursion. pthread_key_create() calls sysctlbyname() which is intercepted but COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED returns true, so the interceptor calls internal_sysctlbyname() which then ends up calling the interceptor again. I fixed this issue by using dlsym() to get the libc version of sysctlbyname() instead. This fixes https://llvm.org/PR40761 Reviewers: vitalybuka, krytarowski, devnexen, dim, bsdjhb, #sanitizers, MaskRay Reviewed By: MaskRay Subscribers: MaskRay, emaste, kubamracek, jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65221 llvm-svn: 367442
* [asan_symbolize] More debugging outputDan Liew2019-07-311-0/+1
| | | | | | | | | When a line fails to match the stackframe regex we now report it in the log. rdar://problem/49476995 llvm-svn: 367380
* [asan_symbolize] Add `--skip-uuid-validation` option to `ModuleMapPlugIn`.Dan Liew2019-07-311-10/+26
| | | | | | | | | This option disables the validation of binary UUIDs. This is useful in environments where the `otool` binary is not available. rdar://problem/49476995 llvm-svn: 367379
* [asan_symbolize] Provide better error message when extracting the UUID of a ↵Dan Liew2019-07-311-1/+3
| | | | | | | | binary fails rdar://problem/49476995 llvm-svn: 367378
* Remove cmake checks for MSVC 1900 / VS 2013Reid Kleckner2019-07-301-6/+5
| | | | | | Our minimum Visual C++ version is 19.10 from Visual Studio 2017. llvm-svn: 367362
* [builtins][test] XFAIL two SPARC testsRainer Orth2019-07-302-0/+8
| | | | | | | | | | | | | | | | Two SPARC builtins tests are currently FAILing due to codegen bugs: Builtins-sparc-sunos :: divtc3_test.c Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c Builtins-sparcv9-sunos :: divtc3_test.c I'd like to XFAIL them to reduce testsuite noise. Done as follows, tested on sparcv9-sun-solaris2.11 and x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D64796 llvm-svn: 367295
* [ASan][test] XFAIL AddressSanitizer-*-sunos :: ↵Rainer Orth2019-07-301-0/+2
| | | | | | | | | | | | | | | | TestCases/intercept-rethrow-exception.cc on Solaris AddressSanitizer-*-sunos :: TestCases/intercept-rethrow-exception.cc currently FAILs on Solaris. This happens because std::rethrow_exception cannot be intercepted, as detailed in Bug 42703. To account for this and reduce testsuite noise, this patch XFAILs the test. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D65056 llvm-svn: 367293
* Revert "[compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for ↵Francis Visoiu Mistrih2019-07-291-5/+0
| | | | | | | | | xray (2)" This reverts commit r367250. It's failing on green dragon: http://lab.llvm.org:8080/green/job/clang-stage1-RA/482/console. llvm-svn: 367265
* [compiler-rt] Appending COMPILER_RT_LIBCXX_PATH -isystem include for xray (2)Puyan Lotfi2019-07-291-0/+5
| | | | | | | | | | | Second attempt. Haven't found a better way to pass the libcxx include path for building compiler-rt with libcxx; this seems to be missing only for xray. Differential Revision: https://reviews.llvm.org/D65307 llvm-svn: 367250
* [compiler-rt] Reverting r367239 (xray include path) to fix bot build breakage.Puyan Lotfi2019-07-291-3/+0
| | | | llvm-svn: 367246
* Appending COMPILER_RT_LIBCXX_PATH include path to -isystem for compiler-rt xrayPuyan Lotfi2019-07-291-0/+3
| | | | | | | | | Haven't found a better way to pass the libcxx include path for building compiler-rt with libcxx; this seems to be missing only for xray. Differential Revision: https://reviews.llvm.org/D65307 llvm-svn: 367239
* Don't initialize interceptor_metadata_map unless SI_POSIX is setEugene Leviant2019-07-281-1/+3
| | | | | | Differential revision: https://reviews.llvm.org/D64794 llvm-svn: 367188
* [compiler-rt] Fix running tests on macOS when XCode is not installedAlexander Richardson2019-07-271-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | Summary: If XCode is not installed, `xcodebuild -version -sdk macosx Path` will give xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance In this case the variable OSX_SYSROOT will be empty and OSX_SYSROOT_FLAG is set to "-isysroot" (without a path). This then causes the CompilerRTUnitTestCheckCxx target failed to for me because "${COMPILER_RT_TEST_COMPILER} ${OSX_SYSROOT_FLAG} -E" expanded to "clang -isysroot -E". This results in a warning "sysroot -E does not exist" and the target fails to run because the C++ headers cannot be found. Reviewers: beanz, kubamracek Reviewed By: beanz Subscribers: dberris, mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65323 llvm-svn: 367170
* [profile] In Android, do not mkdir() dirs in GCOV_PREFIXPirama Arumuga Nainar2019-07-251-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In Android, attempting to mkdir() or even stat() top-level directories like /data causes noisy selinux denials. During whole-system coverage instrumentation, this causes a deluge of noisy messages that drown out legitimate selinux denials, that should be audited and fixed. To avoid this, skip creating any directory in GCOV_PREFIX (thereby assuming that it exists). - Android platform ensures that the GCOV_PREFIX used in Android is created and read/writable by all processes. - This only affects the Android platform (by checking against __ANDROID_API_FUTURE__) and for apps built with Clang coverage, the runtime will still create any non-existent parent directories for the coverage files. Reviewers: srhines, davidxl Subscribers: krytarowski, #sanitizers, danalbert, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65245 llvm-svn: 367064
* [sanitizer_common] Allow customization of StartSymbolizerSubprocessJulian Lettner2019-07-252-7/+13
| | | | | | | | | | | | | | Summary: Make SymbolizerProcess::StartSymbolizerSubprocess virtual and protected to allow subclasses to customize it via "override and call". Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65252 llvm-svn: 366967
* [scudo][standalone] Optimization passKostya Kortchinsky2019-07-2414-94/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This introduces a bunch of small optimizations with the purpose of making the fastpath tighter: - tag more conditions as `LIKELY`/`UNLIKELY`: as a rule of thumb we consider that every operation related to the secondary is unlikely - attempt to reduce the number of potentially extraneous instructions - reorganize the `Chunk` header to not straddle a word boundary and use more appropriate types Note that some `LIKELY`/`UNLIKELY` impact might be less obvious as they are in slow paths (for example in `secondary.cc`), but at this point I am throwing a pretty wide net, and it's consistant and doesn't hurt. This was mosly done for the benfit of Android, but other platforms benefit from it too. An aarch64 Android benchmark gives: - before: ``` BM_youtube/min_time:15.000/repeats:4/manual_time_mean 445244 us 659385 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_median 445007 us 658970 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_stddev 885 us 1332 us 4 ``` - after: ``` BM_youtube/min_time:15.000/repeats:4/manual_time_mean 415697 us 621925 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_median 415913 us 622061 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_stddev 990 us 1163 us 4 ``` Additional since `-Werror=conversion` is enabled on some platforms we are built on, enable it upstream to catch things early: a few sign conversions had slept through and needed additional casting. Reviewers: hctim, morehouse, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, javed.absar, kristof.beyls, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D64664 llvm-svn: 366918
* [libFuzzer] Fix __sanitizer_print_memory_profile return type in ExtFunctions.defMax Moroz2019-07-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: Looks like a typo, as that function actually returns void and is used as such in libFuzzer code as well. Reviewers: kcc, Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65160 llvm-svn: 366834
* [compiler-rt][builtins] Provide __clear_cache for SPARCRainer Orth2019-07-231-0/+10
| | | | | | | | | | | | | | | While working on https://reviews.llvm.org/D40900, two tests were failing since __clear_cache aborted. While libgcc's __clear_cache is just empty, this only happens because gcc (in gcc/config/sparc/sparc.c (sparc32_initialize_trampoline, sparc64_initialize_trampoline)) emits flush insns directly. The following patch mimics that. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64496 llvm-svn: 366822
* [NFC][ASAN] Add brackets around not commandLei Huang2019-07-231-1/+1
| | | | | | | | | Under certain execution conditions, the `not` command binds to the command the output is piped to rather than the command piping the output. In this case, that flips the return code of the FileCheck invocation, causing a failure when FileCheck succeeds. llvm-svn: 366805
OpenPOWER on IntegriCloud