summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* [Msan] XFAIL the ftime.cc test on FreeBSDViktor Kutuzov2015-04-241-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D9222 llvm-svn: 235704
* [Msan] Fix the backtrace.cc tests to build and pass on FreeBSDViktor Kutuzov2015-04-241-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D9221 llvm-svn: 235703
* [Sanitizers] Do not call internal_sigdelset() on non-LinuxViktor Kutuzov2015-04-241-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D9220 llvm-svn: 235701
* [Sanitizer coverage] Print out the error number if OpenFile failsTimur Iskhodzhanov2015-04-231-2/+4
| | | | llvm-svn: 235593
* [ASan/Win] Initialize sandbox-related stuff when asked toTimur Iskhodzhanov2015-04-231-2/+3
| | | | llvm-svn: 235591
* [ASan/Win] Don't forget to set *last_error if OpenFile failsTimur Iskhodzhanov2015-04-231-0/+2
| | | | llvm-svn: 235590
* tsan: support setuid callDmitry Vyukov2015-04-231-0/+3
| | | | | | | Currently the call hangs because the background thread does not handle SIGSETXID signal. llvm-svn: 235581
* [sanitizer] Plug a memory leak in symbolization code.Sergey Matveev2015-04-211-0/+1
| | | | llvm-svn: 235411
* Cast an argument to mprotect syscall to uptr to fix X32Timur Iskhodzhanov2015-04-131-1/+1
| | | | llvm-svn: 234748
* [Sanitizer] Merge POSIXSymbolizer and WinSymbolizerKuba Brecka2015-04-113-29/+18
| | | | | | | | The two subclasses of Symbolizer now only define two virtual functions, PlatformDemangle and PlatformPrepareForSandboxing. Let's make these non-virtual and directly defined by individual platforms. Reviewed at http://reviews.llvm.org/D8912 llvm-svn: 234690
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-112-14/+15
| | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix \ -format llvm-svn: 234680
* Split Mprotect into MmapNoAccess and MprotectNoAccess to be more portableTimur Iskhodzhanov2015-04-1010-8/+32
| | | | | | | On Windows, we have to know if a memory to be protected is mapped or not. On POSIX, Mprotect was semantically different from mprotect most people know. llvm-svn: 234602
* [ASan/Win] Add more support for file operationsTimur Iskhodzhanov2015-04-094-52/+32
| | | | llvm-svn: 234494
* Use error_t rather than int in a couple of places where we handle filesTimur Iskhodzhanov2015-04-092-2/+2
| | | | llvm-svn: 234491
* 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-098-30/+52
| | | | 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-099-19/+24
| | | | llvm-svn: 234481
* Replace a hard-coded constant with a named oneTimur Iskhodzhanov2015-04-091-1/+1
| | | | llvm-svn: 234479
* [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
* [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-0812-59/+81
| | | | | | sanitizer_posix.h llvm-svn: 234418
* [Sanitizers] Make OpenFile more portableTimur Iskhodzhanov2015-04-0810-61/+61
| | | | llvm-svn: 234410
* sanitizer: new "strict_string_checks" run-time flagDmitry Vyukov2015-04-062-12/+60
| | | | | | | | | | 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
* [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
* [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
* [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-312-3/+3
| | | | | | 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
* [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
* [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
* [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] Introduce "ubsan_standalone" library (compiler-rt part).Alexey Samsonov2015-03-231-6/+0
| | | | | | | | | | | | 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
* [Sanitizers] Fix internal_ftruncate() to work on FreeBSDViktor Kutuzov2015-03-231-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D8551 llvm-svn: 233003
* [sanitizer] Fix file access modes in SanitizerCommon.InternalMmapWithOffset ↵Alexander Potapenko2015-03-231-2/+2
| | | | | | and SanitizerCommon.FileOps llvm-svn: 232972
* [ASan] Distinguish between read, write and read-write file access modes in ↵Alexander Potapenko2015-03-2310-26/+34
| | | | | | | | OpenFile. This is to fix mapping coverage files into memory on OSX. llvm-svn: 232936
* Demangling for DlAddrSymbolizerKuba Brecka2015-03-223-2/+5
| | | | | | | | | On OS X, dladdr() provides mangled names only, so we need need to demangle in DlAddrSymbolizer::SymbolizePC. Reviewed at http://reviews.llvm.org/D8291 llvm-svn: 232910
* Add AtosSymbolizer and DlAddrSymbolizer as fallbacks for OS XKuba Brecka2015-03-221-28/+67
| | | | | | | | | | | | | | | | | This patch changes the symbolizer chain on OS X (which currently only uses 1 symbolizer at most) to use this behavior: * By default, use LLVMSymbolizer -> DlAddrSymbolizer. * If the llvm-symbolizer binary is not found, use AtosSymbolizer -> DlAddrSymbolizer. * If the user specifies ASAN_SYMBOLIZER_PATH=.../atos, then use AtosSymbolizer -> DlAddrSymbolizer. * If neither llvm-symbolizer or atos is found, or external symbolication is disabled with ASAN_SYMBOLIZER_PATH="", use DlAddrSymbolizer. Reviewed at http://reviews.llvm.org/D8285 llvm-svn: 232908
* [sanitizer] fix 'sancov.py merge' and add a test for itKostya Serebryany2015-03-191-9/+11
| | | | llvm-svn: 232763
* [sanitizer] trying to fix sancov.py with 32-bit pythonKostya Serebryany2015-03-191-7/+18
| | | | llvm-svn: 232754
* [sanitizer] change the sanitizer coverage format once again, this time ↵Kostya Serebryany2015-03-182-40/+75
| | | | | | adding a magic to the beginning of the file llvm-svn: 232679
* [sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are ↵Kostya Serebryany2015-03-184-10/+50
| | | | | | dumped in the order of their appearance llvm-svn: 232573
OpenPOWER on IntegriCloud