summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use RenameFile instead of internal_rename in non-POSIX codeTimur Iskhodzhanov2015-04-096-7/+14
| | | | llvm-svn: 234490
* Use WriteToFile instead of internal_write in non-POSIX codeTimur Iskhodzhanov2015-04-0911-35/+58
| | | | llvm-svn: 234487
* Use ReadFromFile instead of internal_read in non-POSIX codeTimur Iskhodzhanov2015-04-096-7/+22
| | | | llvm-svn: 234485
* Move more POSIX-specific functions to sanitizer_posix.hTimur Iskhodzhanov2015-04-095-32/+13
| | | | llvm-svn: 234482
* Introduce CloseFile to be used instead of internal_close on non-POSIXTimur Iskhodzhanov2015-04-0910-20/+25
| | | | llvm-svn: 234481
* Replace a hard-coded constant with a named oneTimur Iskhodzhanov2015-04-091-1/+1
| | | | llvm-svn: 234479
* Differential Revision: http://reviews.llvm.org/D7249Lorenzo Martignoni2015-04-093-214/+203
| | | | llvm-svn: 234477
* [Sanitizer] Get rid of PlatformGetListOfModulesKuba Brecka2015-04-095-130/+115
| | | | | | | | Moving the implementation of several functions from sanitizer_symbolizer.cc into sanitizer_symbolizer_libcdep.cc. Reviewed at http://reviews.llvm.org/D8858 llvm-svn: 234472
* [ASan] Only include rpc headers if they are available.Yury Gribov2015-04-093-2/+16
| | | | | | Reviewed at http://reviews.llvm.org/D8698 llvm-svn: 234470
* [Compiler-rt][MIPS] Fix for asan test suite build on mips64/mips64elMohit K. Bhakkad2015-04-091-2/+4
| | | | | | | Patch by Sagar Thakur Reviewers: dsanders llvm-svn: 234468
* [Sanitizer RT] Get rid of internal_isattyTimur Iskhodzhanov2015-04-085-11/+13
| | | | llvm-svn: 234423
* Move some POSIX-specific functions from sanitizer_libc.h to a new ↵Timur Iskhodzhanov2015-04-0814-59/+86
| | | | | | sanitizer_posix.h llvm-svn: 234418
* [Sanitizers] Make OpenFile more portableTimur Iskhodzhanov2015-04-0811-64/+64
| | | | llvm-svn: 234410
* tsan: handle async signals while blocked in pthread_cond_waitDmitry Vyukov2015-04-083-8/+33
| | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=91 llvm-svn: 234394
* sanitizer: new "strict_string_checks" run-time flagDmitry Vyukov2015-04-066-90/+120
| | | | | | | | | | This patch is related to Issue 346: moar string interceptors: strstr, strcasestr, strcspn, strpbrk As was suggested in original review http://reviews.llvm.org/D6056 a new "strict_string_checks" run-time flag introduced. The flag support applied for existing common, asan, msan and tsan interceptors. New asan tests added. Change by Maria Guseva reviewed in http://reviews.llvm.org/D7123 llvm-svn: 234187
* Minor follow-up fix to r234150Timur Iskhodzhanov2015-04-061-1/+1
| | | | llvm-svn: 234151
* [ASan] Unify handling of loaded modules between POSIX and WindowsTimur Iskhodzhanov2015-04-0612-140/+150
| | | | | | Reviewed at http://reviews.llvm.org/D8805 llvm-svn: 234150
* Add hard float versions of FP to LL conversionsSergey Dmitrouk2015-04-064-4/+97
| | | | | | | | | | | | | | | | | | | | | | | | | This adds hard-float implementation for the following builtins: * __fixdfdi() * __fixsfdi() * __fixunsdfdi() * __fixunssfdi() The soft-float implementation does never raise floating point exceptions, which doesn't allow clients to detect floating point conversion errors. I must mention that I had to refer to libgcc's implementation to write these functions. Related unit-tests of compiler-rt passed with these changes. Patch was somewhat out-dated, so was updated locally without any functional changes. Differential Revision: http://reviews.llvm.org/D5376 llvm-svn: 234148
* [ASan] Do not print thread IDs and stacks for unknown threads.Alexander Potapenko2015-04-061-0/+5
| | | | llvm-svn: 234147
* tsan: fix munmap interceptorDmitry Vyukov2015-04-061-2/+5
| | | | | | | | | MetaMap::ResetRange/FreeRange rounds the range up to at least kMetaShadowSize. This is requried for e.g. free(malloc(0)). However, munmap returns EINVAL and do not unmap any memory when length arguments is equal to 0. So don't free meta shadow in this case as well. llvm-svn: 234145
* Add missing includeJustin Bogner2015-04-031-0/+1
| | | | llvm-svn: 234037
* profile: Protect .gcda output with flockJustin Bogner2015-04-031-0/+6
| | | | | | | | | | | This avoids crashing or corrupting data if multiple concurrent processes write to the same .gcda file. This is hard to test, since the previous behaviour was a data race that often worked out, and it ignores errors in flock to fall back to the old racy behaviour so that it won't degrade the behaviour on filesystems that don't support flock. llvm-svn: 234036
* [sancov] Shrink pc array on Android back to 2**24.Evgeniy Stepanov2015-04-031-1/+2
| | | | | | Address space is a lot more constrained on 32-bit Android compared to Linux. llvm-svn: 234010
* [ASan/Win] Minor improvements towards enabling coverageTimur Iskhodzhanov2015-04-024-5/+28
| | | | llvm-svn: 233918
* Add missing " at the end of the #error directive.Alexey Samsonov2015-04-021-1/+1
| | | | llvm-svn: 233879
* [CMake] Fixup for r233861: don't build standalone UBSan on unsupported ↵Alexey Samsonov2015-04-011-25/+27
| | | | | | platforms. llvm-svn: 233865
* [UBSan] Embed UBSan into ASan runtime (compiler-rt part).Alexey Samsonov2015-04-0114-101/+181
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [ASan] Make the remaining coverage tests pass on Darwin, move them to Posix/Alexander Potapenko2015-04-013-20/+16
| | | | | | | | | This CL: - moves PrepareForSandboxing() to sanitizer_posix_libcdep.cc - fixes the coverage tests to use flag substitutions defined in r233802 and not rely on hardcoded shared library names - moves those tests to TestCases/Posix so that they can be executed on Darwin llvm-svn: 233828
* [PPC64]This activates UBSan for the power architecture.Bill Seurer2015-04-012-2/+8
| | | | | | | | One test case is updated to allow for differences between power and other architectures in behavior when returning from main in certain instances http://reviews.llvm.org/D8743 llvm-svn: 233813
* [Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shellTimur Iskhodzhanov2015-04-011-6/+13
| | | | | | Reviewed at http://reviews.llvm.org/D8724 llvm-svn: 233809
* [Sanitizer] Be consistent about separating ==%PID== and logged data.Alexey Samsonov2015-03-313-5/+5
| | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=385. llvm-svn: 233720
* [ASan/Win] UnmapOrDie should not fail on zero address / sizeTimur Iskhodzhanov2015-03-311-0/+3
| | | | llvm-svn: 233707
* [Sanitizer RT] Put the Symbolizer module name string ownership in orderTimur Iskhodzhanov2015-03-313-10/+58
| | | | | | Reviewed at http://reviews.llvm.org/D8666 llvm-svn: 233687
* Add another sanity check for swapcontext, which is currently unsupported. ↵Nick Lewycky2015-03-271-1/+1
| | | | | | Patch by Alexey Samsonov! llvm-svn: 233413
* [Tsan] Do not sanitize memset() and other functions during initializationViktor Kutuzov2015-03-271-3/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D8544 llvm-svn: 233378
* tsan: don't write to meta shadow unnecessarilyDmitry Vyukov2015-03-271-4/+6
| | | | | | | If user does malloc(1<<30), the write to meta shadow can cause excessive memory consumption. llvm-svn: 233373
* [UBSan] Explicitly list all supported OS/arch pairs supported by UBSan.Alexey Samsonov2015-03-269-7/+54
| | | | llvm-svn: 233295
* [Sanitizer] Plug a leak in POSIXSymbolizer::FindModuleForAddressTimur Iskhodzhanov2015-03-262-6/+6
| | | | | | | | | It was happening when we looked up a PC for a module that was dlopen'ed/dlclose'd after the last time we fetched the list of modules Reviewed at http://reviews.llvm.org/D8618 llvm-svn: 233257
* [LSan] Don't explicitly exclude LSan from Windows build - it should just ↵Alexey Samsonov2015-03-252-10/+3
| | | | | | produce dummy object files. NFC. llvm-svn: 233231
* [Sanitizers coverage] Minor cleanup: reduce scope and visibility of one ↵Timur Iskhodzhanov2015-03-251-6/+6
| | | | | | method and one variable llvm-svn: 233212
* [PowerPC]Fix sancov.py to once again support big endianBill Seurer2015-03-251-9/+9
| | | | | | | | Some recent changes to sancov.py broke ASAN for big endian. This fixes it. http://reviews.llvm.org/D8594 llvm-svn: 233189
* [ASan] Suppress the deprecation warning from atos that breaks AtosSymbolizer ↵Alexander Potapenko2015-03-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | on OSX 10.9 On OS X 10.9 /usr/bin/atos prints the following warning upon invocation: -- Warning: /usr/bin/atos is moving and will be removed from a future OS X release. It is now available in the Xcode developer tools to be invoked via: `xcrun atos` To silence this warning, pass the '-d' command-line flag to this tool. -- AtosSymbolizer treats the warning as the symbolization result for the first PC passed to the symbolizer. As a result, for each of the following PCs the file:line info for the previous PC is printed, e.g.: ==97926==ERROR: AddressSanitizer: attempting double-free on 0x60200000dfb0 in thread T0: ==97926==Using atos at user-specified path: /usr/bin/atos ==97926==Using dladdr symbolizer. #0 0x1007407e0 in -- (+0x427e0) #1 0x1006f6f25 in wrap_free asan_malloc_mac.cc:114 #2 0x7fff916e05fc in main atos-symbolizer.cc:17 #3 0x0 (<unknown module>) Unfortunately atos doesn't accept the -d switch on OSX versions other than 10.9, thus we have to check for the OSX version. llvm-svn: 233180
* Revert "Revert "[UBSan] Use shared library for UBSan on OS X" and its followup"Alexey Samsonov2015-03-241-7/+14
| | | | | | Fix the build/tests by providing -lc++abi for UBSan runtime only. llvm-svn: 233122
* Revert "[UBSan] Use shared library for UBSan on OS X" and its followupJustin Bogner2015-03-241-13/+7
| | | | | | | | | | This change caused test failures on darwin, and the followup which was meant to fix those caused compiler-rt to start failing to link. Reverting to get the build working again. This reverts r233071 and r233036. llvm-svn: 233097
* [TSan] Disable -Wno-maybe-uninitialized in yet another place.Alexey Samsonov2015-03-241-0/+1
| | | | llvm-svn: 233044
* [TSan] Fixup for r233038: restrict the -Wno-maybe-uninitialized flag to GCC ↵Alexey Samsonov2015-03-231-2/+3
| | | | | | only. llvm-svn: 233042
* [TSan] Disable noisy GCC warning.Alexey Samsonov2015-03-231-0/+1
| | | | llvm-svn: 233038
* [sanitizer] instead of comparing pointers to module_names while initializing ↵Kostya Serebryany2015-03-231-10/+12
| | | | | | coverage do a proper strcmp and strdup. NFC llvm-svn: 233037
* [UBSan] Use shared library for UBSan on OS X (compiler-rt part).Alexey Samsonov2015-03-231-7/+13
| | | | | | | | | | | | | | | | Summary: Switch to shared library for UBSan. Add support for building UBSan on OSX and iossim by cargo-culting ASan build rules. Test Plan: regression test suite Reviewers: zaks.anna, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8473 llvm-svn: 233036
* [UBSan] Introduce "ubsan_standalone" library (compiler-rt part).Alexey Samsonov2015-03-232-13/+27
| | | | | | | | | | | | Get rid of "libclang_rt.san" library that used to contain sanitizer_common pieces required by UBSan if it's used in a standalone mode. Instead, build two variants of UBSan runtime: "ubsan" and "ubsan_standalone" (same for "ubsan_cxx" and "ubsan_standalone_cxx"). Later "ubsan" and "ubsan_cxx" libraries will go away, as they will embedded it into corresponding ASan runtimes. llvm-svn: 233011
OpenPOWER on IntegriCloud