summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* tsan: fix PTRACE_ATTACH handling during stop-the-worldDmitry Vyukov2015-02-191-18/+32
| | | | | | | | | | | | | | | | | | | If the thread receives a signal concurrently with PTRACE_ATTACH, we can get notification about the signal before notification about stop. In such case we need to forward the signal to the thread, otherwise the signal will be missed (as we do PTRACE_DETACH with arg=0) and any logic relying on signals will break. After forwarding we need to continue to wait for stopping, because the thread is not stopped yet. We do ignore delivery of SIGSTOP, because we want to make stop-the-world as invisible as possible. http://reviews.llvm.org/D7723 --This line, and those below, will be ignored-- M lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc M test/tsan/signal_segv_handler.cc llvm-svn: 229832
* [LSan] [MIPS] adding support of LSan for mips64/mips64el archMohit K. Bhakkad2015-02-196-5/+63
| | | | | | | | | | | | Patch by Sagar Thakur Reviewers: petarj, earthdok, kcc. Subscribers: samsonov, dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7013 llvm-svn: 229830
* tsan: fix signal handling during stop-the-worldDmitry Vyukov2015-02-181-50/+42
| | | | | | | | | | Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL. This breaks programs that handle and continue after SIGSEGV (namely JVM). See the test and comments for details. http://reviews.llvm.org/D7722 llvm-svn: 229678
* tsan: add -Wno-maybe-uninitialized to mingw gcc build flagsDmitry Vyukov2015-02-181-1/+1
| | | | | | | As per discussion with David Blaikie here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150216/260289.html llvm-svn: 229657
* [MSan][MIPS] Fix for some failing tests on MIPS64Mohit K. Bhakkad2015-02-184-7/+20
| | | | | | | | | | | | | | Enabling internal ptrace for mips, which fixes some ptrace related tests. Along with this fixing some other failures. Reviewers: Reviewers: eugenis, kcc, samsonov Subscribers: dsanders, sagar, lldb-commits Differential Revision: http://reviews.llvm.org/D7332 llvm-svn: 229656
* Revert "Remove support for building sanitizers from Makefile/autoconf build."Matthias Braun2015-02-171-0/+22
| | | | | | | | | This reverts commit r229556. Reverting this for now as internal apple builds rely on this functionality. llvm-svn: 229585
* Silence an MSVC warning about testing a function for truth without calling itReid Kleckner2015-02-171-1/+1
| | | | | | | | | In general, this is a reasonable warning, except real_pthread_create is weak and can be null. The existing usage is correct as it the function is declared with SANITIZER_WEAK, but MSVC can't know that because it is defined to nothing on Windows. llvm-svn: 229562
* Remove support for building sanitizers from Makefile/autoconf build.Alexey Samsonov2015-02-171-22/+0
| | | | | | | | They autotools build has a number of missing features, supports less OS, architectures, build configurations, doesn't have any tests and is hard to support in sync with CMake build. llvm-svn: 229556
* Remove inclusion of netinet/ip_compat.h for FreeBSD. This header is notDimitry Andric2015-02-171-1/+0
| | | | | | | | | | | | | always available, and nothing in sanitizer_platform_limits_posix.cc uses any of its definitions. See also: https://svnweb.freebsd.org/changeset/base/277201 Reviewers: kcc, kutuzov.viktor.84, samsonov Reviewed By: samsonov Differential Revision: http://reviews.llvm.org/D7486 llvm-svn: 229518
* tsan: fix freebsd buildDmitry Vyukov2015-02-161-0/+2
| | | | | | GetTls is not defined in Go mode. llvm-svn: 229395
* tsan: fix compiler warningDmitry Vyukov2015-02-161-1/+1
| | | | | | | | mingw gcc complains: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] Printf("Failed to read options from '%s': error %d\n", value, err); llvm-svn: 229392
* tsan: exclude DumpProcessMap on windowsDmitry Vyukov2015-02-161-0/+2
| | | | | | | The function uses EnumProcessModules, which requires psapi.lib, which is not linked with tsan on windows. llvm-svn: 229390
* [Sanitizer] Add "final" specifier to FlagHandlerBase::Parse overrides. NFC.Alexey Samsonov2015-02-122-2/+2
| | | | llvm-svn: 228893
* [Sanitizers] The MAP_NORESERVE define has been removed in FreeBSD 11.x,Dimitry Andric2015-02-111-0/+7
| | | | | | | | | and even before that, it was never implemented. Just define it to zero instead, so compiler-rt can compile on FreeBSD 11 and later. Differential Revision: http://reviews.llvm.org/D7485 llvm-svn: 228871
* [ASan/Win] NFC, just minor simplification of the codeTimur Iskhodzhanov2015-02-101-2/+2
| | | | llvm-svn: 228702
* [ASan/Win] Add the executable's directory to the symbol search pathTimur Iskhodzhanov2015-02-101-19/+53
| | | | | | This should fix symbolization in those cases when the .exe file is moved together with the .pdb llvm-svn: 228701
* [compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when ↵Kuba Brecka2015-02-062-0/+10
| | | | | | | | | | | | using non-absolute paths MaybeReexec() in asan_mac.cc checks for presence of the ASan dylib in DYLD_INSERT_LIBRARIES, and if it is there, it will process this env. var. and remove the dylib from its value, so that spawned children don't have this variable set. However, the current implementation only works when using a canonical absolute path to the dylib, it fails to remove the dylib for example when using @executable_path. This patch changes the processing of DYLD_INSERT_LIBRARIES to comparing values only based on filenames (ignoring directories). Reviewed at http://reviews.llvm.org/D7160 llvm-svn: 228392
* [Msan] Fix the pthread_attr_get unit test to build on FreeBSDViktor Kutuzov2015-02-041-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D7342 llvm-svn: 228125
* [sanitizer] add another workaround for PR 17409: when over a threshold emit ↵Kostya Serebryany2015-02-041-0/+5
| | | | | | coverage instrumentation as calls. llvm-svn: 228102
* [ASan] Add use_madv_dontdump flag.Yury Gribov2015-02-034-1/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D7294 llvm-svn: 227959
* [Sanitizer] Fix checking for weak function presence.Alexey Samsonov2015-02-021-2/+2
| | | | llvm-svn: 227851
* [ASan/Win] Add some diagnostics to help investigate Mprotect failuresTimur Iskhodzhanov2015-02-021-3/+8
| | | | llvm-svn: 227803
* [Sanitizers] Intercept ether functions on FreeBSDViktor Kutuzov2015-02-021-2/+3
| | | | | | Committed unreviewed with permission. llvm-svn: 227795
* [Sanitizers] Intercept memrchr() on FreeBSDViktor Kutuzov2015-02-021-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 227794
* [Sanitizers] Intercept getpwnam_r() on FreeBSDViktor Kutuzov2015-02-021-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 227793
* [Sanitizers] Intercept getpwent_r() on FreeBSDViktor Kutuzov2015-02-021-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 227792
* [Sanitizers] Intercept getpwent() on FreeBSDViktor Kutuzov2015-02-021-1/+2
| | | | | | Committed unreviewed with permission. llvm-svn: 227791
* [Sanitizers] Re-apply the fix ordering initialization of coverage and guard ↵Viktor Kutuzov2015-02-021-1/+3
| | | | | | | | | arrays Original commit: http://reviews.llvm.org/rL226440 Related review: http://reviews.llvm.org/D6892 llvm-svn: 227789
* Revert "Remove unused function."Alexey Samsonov2015-01-313-0/+22
| | | | | | This reverts commit r227633. SetEnv was prematurely deleted. llvm-svn: 227665
* [TSan] Fix Go build.Alexey Samsonov2015-01-302-12/+12
| | | | llvm-svn: 227634
* Remove unused function.Alexey Samsonov2015-01-303-20/+0
| | | | llvm-svn: 227633
* [Sanitizers] Intercept gethost functions on FreeBSDViktor Kutuzov2015-01-301-4/+4
| | | | | | Committed unreviewed with permission. llvm-svn: 227572
* [Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macroViktor Kutuzov2015-01-303-1/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D7233 llvm-svn: 227570
* [Sanitizer] Make BlockingMutex really linker initialized.Yury Gribov2015-01-303-8/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D7171 llvm-svn: 227560
* [asan] use getrusage as an alternative to reading /proc/self/statm. Also ↵Kostya Serebryany2015-01-293-27/+42
| | | | | | move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself) llvm-svn: 227416
* [sanitizer] allow to reset the bb/edge coverage data inside the process ↵Kostya Serebryany2015-01-281-2/+21
| | | | | | while it is running (single-threaded). Also expose the current coverage set to the process. llvm-svn: 227387
* Revert r226440.Evgeniy Stepanov2015-01-271-3/+1
| | | | | | It was fixed the right way in r227195. llvm-svn: 227196
* [sanitizer] Update descriptor size for glibc 2.13.Sergey Matveev2015-01-231-0/+2
| | | | | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=361 It's still not clear whether the values are correct in all cases, but at least this should unbreak our bots. llvm-svn: 226938
* [compiler-rt] Fix the prototype of ioctl interceptorKuba Brecka2015-01-231-1/+9
| | | | | | | | | | | | | | | | | | | | The interceptor of ioctl is using a non-standard prototype: INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) At least on OS X, the request argument should be unsigned long and not just unsigned, and also instead of the last argument (arg), the function should be accepting a variable number of arguments, so the prototype should be: int ioctl(int fildes, unsigned long request, ...); We can still keep using `unsigned` internally to save space, because we know that all possible values of `request` will fit into it. Reviewed at http://reviews.llvm.org/D7038 llvm-svn: 226926
* [sanitizer] Fix an edge case in MemoryRangeIsAvailable.Evgeniy Stepanov2015-01-231-1/+2
| | | | llvm-svn: 226913
* [Sanitizers] Intercept statfs() on FreeBSDViktor Kutuzov2015-01-231-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 226910
* Fix/workaround for OS X truncated stacktraces taken by external toolsKuba Brecka2015-01-221-0/+7
| | | | | | | | | | This patch is a proposed solution for https://code.google.com/p/address-sanitizer/issues/detail?id=375: When the stacktraces are captured and printed by ASan itself, they are fine, but when the program has already printed the report (or is just printing it), capturing a stacktrace via other means is broken. "Other means" include OS X CrashReporter, debuggers or calling backtrace() within the program. For example calling backtrace() from a sanitizer_set_death_callback function prints a very truncated stacktrace. Reviewed at http://reviews.llvm.org/D7103 llvm-svn: 226878
* [sanitizer] Intercept sched_getparam.Evgeniy Stepanov2015-01-222-0/+15
| | | | llvm-svn: 226827
* [sanitizer] Fix windows build.Evgeniy Stepanov2015-01-221-2/+2
| | | | llvm-svn: 226825
* [msan] Better use-after-free reports.Evgeniy Stepanov2015-01-225-16/+27
| | | | | | | | | | | | | By attaching an extra integer tag to heap origins, we are able to distinguish between uninits - created by heap allocation, - created by heap deallocation (i.e. use-after-free), - created by __msan_allocated_memory call, - etc. See https://code.google.com/p/memory-sanitizer/issues/detail?id=35. llvm-svn: 226821
* [Sanitizers] Fix inet_aton() and inet_pton() interceptors to work on FreeBSDViktor Kutuzov2015-01-221-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D7084 llvm-svn: 226796
* [Sanitizers] Intercept preadv() on FreeBSDViktor Kutuzov2015-01-221-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 226794
* [Sanitizers] Intercept confstr() on FreeBSDViktor Kutuzov2015-01-211-1/+2
| | | | | | Committed unreviewed with permission. llvm-svn: 226649
* [Sanitizers] Intercept opendir()Viktor Kutuzov2015-01-211-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D6968 llvm-svn: 226648
* [sanitizer] First step toward supporting 42-bit AS on aarch64Kostya Serebryany2015-01-211-3/+2
| | | | | | | | | | | | | | | aarch64-linux kernel has configurable 39, 42 or 47 bit virtual address space. Most distros AFAIK use 42-bit VA right now, but there are also 39-bit VA users too. The ppc64 handling can be used for this just fine and support all the 3 sizes. There are other issues, like allocator32 not really being able to support the larger addres spaces, and hardcoded 39-bit address space size in other macros. Patch by Jakub Jelinek. llvm-svn: 226639
OpenPOWER on IntegriCloud