summaryrefslogtreecommitdiff
path: root/lib/asan/asan_interceptors.h
Commit message (Collapse)AuthorAgeFilesLines
* Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSDKamil Rytarowski2019-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit, after executing all callback. This causes false positives as DoLeakCheck() is called from the atexit handler. In the LSan/ASan tests there are strict checks triggering false positives here. Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the real functions. Stop tracing allocations in pthread_atfork(3) funtions, as there are performed internal allocations that are not freed for the time of running StopTheWorld() code. This avoids false-positives. The same changes have to be replicated in the ASan and LSan runtime. Non-NetBSD OSs are not tested and this code is restricted to NetBSD only. Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67331 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@372459 91177308-0d34-0410-b5e6-96231b3b80d8
* compiler-rt: Rename .cc file in lib/asan to .cppNico Weber2019-08-011-1/+1
| | | | | | | Like r367463, but for asan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@367558 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Don't generate "failed to intercept" constants for each functionVitaly Buka2019-05-161-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360958 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Reland "Cleanup INTERCEPT_FUNCTION macro"Julian Lettner2019-05-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | On Linux both version of the INTERCEPT_FUNCTION macro now return true when interception was successful. Adapt and cleanup some usages. Also note that `&(func) == &WRAP(func)` is a link-time property, but we do a runtime check. Tested on Linux and macOS. Previous attempt reverted by: 5642c3feb03d020dc06a62e3dc54f3206a97a391 This attempt to bring order to the interceptor macro goes the other direction and aligns the Linux implementation with the way things are done on Windows. Reviewed By: vitalybuka, rnk Differential Revision: https://reviews.llvm.org/D61358 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359725 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r359325 "[NFC][Sanitizer] Change "return type" of INTERCEPT_FUNCTION ↵Reid Kleckner2019-04-301-4/+2
| | | | | | | | | | | | | | | to void" Changing INTERCEPT_FUNCTION to return void is not functionally correct. IMO the best way to communicate failure or success of interception is with a return value, not some external address comparison. This change was also creating link errors for _except_handler4_common, which is exported from ucrtbase.dll in 32-bit Windows. Also revert dependent changes r359362 and r359466. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359611 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Cleanup {ASAN, MSAN}_INTERCEPT_FUNC[_VER] macroJulian Lettner2019-04-291-4/+2
| | | | | | | | | | | | Note that this change is not strictly NFC since we add the `(&(name) != &WRAP(name)` part to the conditional for the `_VER` variant of the macro. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D61204 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359466 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC][Sanitizer] Change "return type" of INTERCEPT_FUNCTION to voidJulian Lettner2019-04-261-2/+6
| | | | | | | | | | | | This temporary change tells us about all the places where the return value of the INTERCEPT_FUNCTION macro is actually used. In the next patch I will cleanup the macro and remove GetRealFuncAddress. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D61145 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359325 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix compilation errors in r355030.Evgeniy Stepanov2019-02-271-0/+7
| | | | | | | | Disable hwasan interceptor on non-linux, non-x86-or-arm platforms. Add @plt to the asm call that clang intergrated-as infers but gcc does not. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355041 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Trivial portion of the port to Myriad RTEMSWalter Lee2018-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | This commit contains the trivial portion of the port of ASan to Myriad RTEMS. - Whitelist platform in sanitizer_platform.h, ubsan_platform.h - Turn off general interception - Use memset for FastPoisonShadow - Define interception wrappers - Set errno symbol correctly - Enable ASAN_LOW_MEMORY - Enable preinit array - Disable slow unwinding - Use fuchsia offline symbolizer - Disable common code for: InitializeShadowMemory, CreateMainThread, AsanThread::ThreadStart, StartReportDeadlySignal, MaybeReportNonExecRegion. Differential Revision: https://reviews.llvm.org/D46454 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332681 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[asan] Replace vfork with fork."Evgeniy Stepanov2018-03-271-2/+0
| | | | | | | | | Replacing vfork with fork results in significant slowdown of certain apps (in particular, memcached). This reverts r327752. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328600 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Replace vfork with fork.Evgeniy Stepanov2018-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: vfork is not ASan-friendly because it modifies stack shadow in the parent process address space. While it is possible to compensate for that with, for example, __asan_handle_no_return before each call to _exit or execve and friends, simply replacing vfork with fork looks like by far the easiest solution. Posix compliant programs can not detect the difference between vfork and fork. Fixes https://github.com/google/sanitizers/issues/925 Reviewers: kcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D44587 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@327752 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Remove empty fork interceptor.Evgeniy Stepanov2018-03-161-2/+0
| | | | | | After a partial revert, ASan somehow ended up with an empty interceptor for fork(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@327748 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable ASan exceptions on NetBSDKamil Rytarowski2018-02-271-1/+2
| | | | | | | | | | | | | | | | This is a workarond for the fallout from D42644: [asan] Intercept std::rethrow_exception indirectly. Reported problem on NetBSD/amd64: $ sh ./projects/compiler-rt/test/sanitizer_common/asan-i386-NetBSD/NetBSD/Output/ttyent.cc.script /usr/lib/i386/libgcc.a(unwind-dw2.o): In function `_Unwind_RaiseException': unwind-dw2.c:(.text+0x1b41): multiple definition of `_Unwind_RaiseException' /public/llvm-build/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a(asan_interceptors.cc.o):/public/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:337: first defined here clang-7.0: error: linker command failed with exit code 1 (use -v to see invocation) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326216 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Enable ASAN_INTERCEPT___CXA_THROW for x86 AndroidVitaly Buka2018-02-271-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326160 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build for iOS/ARM ("__Unwind_RaiseException" is not available for armv7).Kuba Mracek2018-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326150 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Intercept std::rethrow_exception indirectlyVitaly Buka2018-02-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes Bug 32434 See https://bugs.llvm.org/show_bug.cgi?id=32434 Short summary: std::rethrow_exception does not use __cxa_throw to rethrow the exception, so if it is called from uninstrumented code, it will leave the stack poisoned. This can lead to false positives. Long description: For functions which don't return normally (e.g. via exceptions), asan needs to unpoison the entire stack. It is not known before a call to such a function where execution will continue, some function which don't contain cleanup code like destructors might be skipped. After stack unwinding, execution might continue in uninstrumented code. If the stack has been poisoned before such a function is called, but the stack is unwound during the unconventional return, then zombie redzones (entries) for no longer existing stack variables can remain in the shadow memory. Normally, this is avoided by asan generating a call to asan_handle_no_return before all functions marked as [[noreturn]]. This asan_handle_no_return unpoisons the entire stack. Since these [[noreturn]] functions can be called from uninstrumented code, asan also introduces interceptor functions which call asan_handle_no_return before running the original [[noreturn]] function; for example, cxa_throw is intercepted. If a [[noreturn]] function is called from uninstrumented code (so the stack is left poisoned) and additionally, execution continues in uninstrumented code, new stack variables might be introduced and overlap with the stack variables which have been removed during stack unwinding. Since the redzones are not cleared nor overwritten by uninstrumented code, they remain but now contain invalid data. Now, if the redzones are checked against the new stack variables, false positive reports can occur. This can happen for example by the uninstrumented code calling an intercepted function such as memcpy, or an instrumented function. Intercepting std::rethrow_exception directly is not easily possible since it depends on the C++ standard library implementation (e.g. libcxx vs libstdc++) and the mangled name it produces for this function. As a rather simple workaround, we're intercepting _Unwind_RaiseException for libstdc++. For libcxxabi, we can intercept the ABI function __cxa_rethrow_primary_exception. Patch by Robert Schneider. Reviewers: kcc, eugenis, alekseyshl, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42644 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326132 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] Basic sanitizer Solaris support (PR 33274)Kamil Rytarowski2017-12-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first mostly working version of the Sanitizer port to 32-bit Solaris/x86. It is currently based on Solaris 11.4 Beta. This part was initially developed inside libsanitizer in the GCC tree and should apply to both. Subsequent parts will address changes to clang, the compiler-rt build system and testsuite. I'm not yet sure what the right patch granularity is: if it's profitable to split the patch up, I'd like to get guidance on how to do so. Most of the changes are probably straightforward with a few exceptions: * The Solaris syscall interface isn't stable, undocumented and can change within an OS release. The stable interface is the libc interface, which I'm using here, if possible using the internal _-prefixed names. * While the patch primarily target 32-bit x86, I've left a few sparc changes in. They cannot currently be used with clang due to a backend limitation, but have worked fine inside the gcc tree. * Some functions (e.g. largefile versions of functions like open64) only exist in 32-bit Solaris, so I've introduced a separate SANITIZER_SOLARIS32 to check for that. The patch (with the subsequent ones to be submitted shortly) was tested on i386-pc-solaris2.11. Only a few failures remain, some of them analyzed, some still TBD: AddressSanitizer-i386-sunos :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos :: TestCases/malloc-no-intercept.c AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/start-deactivated.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/default_options.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/malloc-no-intercept.c SanitizerCommon-Unit :: ./Sanitizer-i386-Test/MemoryMappingLayout.DumpListOfModules SanitizerCommon-Unit :: ./Sanitizer-i386-Test/SanitizerCommon.PthreadDestructorIterations Maybe this is good enough the get the ball rolling. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, jyknight, kubamracek, krytarowski, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40898 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320740 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Remove unneeded forward declaration of real_sigactionVitaly Buka2017-11-101-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317869 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Remove unneeded forward declarationsVitaly Buka2017-11-101-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317868 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Allow sanitizers to redefine implementation of signal interceptorsVitaly Buka2017-11-091-2/+7
| | | | | | | | | | Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39870 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317843 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Move signal interceptors from asan to sanitizer_commonVitaly Buka2017-09-161-6/+0
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D37889 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313449 91177308-0d34-0410-b5e6-96231b3b80d8
* Add NetBSD support in asan_interceptors.hKamil Rytarowski2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, filcab, kcc, fjricci, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36375 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310246 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Interceptors for FuchsiaVitaly Buka2017-08-021-13/+21
| | | | | | | | | | | | | | | | | | | | Summary: Fuchsia uses the "memintrinsics" interceptors, though not via any generalized interception mechanism. It doesn't use any other interceptors. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: kubamracek, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36189 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309798 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Move memcpy, memmove, memset code out of asan_interceptors.ccAlex Shlyapnikov2017-07-201-2/+1
| | | | | | | | | | | | | | | | This is a pure refactoring change. It simply moves all the code and macros related to defining the ASan interceptor versions of memcpy, memmove, and memset into a separate file. This makes it cleaner to disable all the other interceptor code while still using these three, for a port that defines these but not the other common interceptors. Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35590 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308575 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASAN] Add interceptor for __longjmp_chkPeter Wu2017-05-041-0/+6
| | | | | | | | | | | | | | | | | Summary: glibc on Linux calls __longjmp_chk instead of longjmp (or _longjmp) when _FORTIFY_SOURCE is defined. Ensure that an ASAN-instrumented program intercepts this function when a system library calls it, otherwise the stack might remain poisoned and result in CHECK failures and false positives. Fixes https://github.com/google/sanitizers/issues/721 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D32408 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302152 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Add __strdup interceptor.Evgeniy Stepanov2016-04-201-0/+6
| | | | | | This happens on Linux when building as C (not C++) with optimization. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266931 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Add strnlen to the common interceptorsDerek Bruening2016-03-231-6/+0
| | | | | | | | | | | | | | | | | | | Summary: Adds strnlen to the common interceptors, under the existing flag intercept_strlen. Removes the now-duplicate strnlen interceptor from asan and msan. This adds strnlen to tsan, which previously did not intercept it. Adds a new test of strnlen to the sanitizer_common test cases. Reviewers: samsonov Subscribers: zhaoqin, llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D18397 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264195 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Intercept strdup on WindowsReid Kleckner2016-03-221-2/+0
| | | | | | | | Some unit tests were failing because we didn't intercept strdup. It turns out it works just fine on 2013 and 2015 with a small patch to the interception logic. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264013 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Versioned interceptor for pthread_create.Evgeniy Stepanov2015-09-221-0/+6
| | | | | | | | | This fixes a crash in pthread_create on linux/i386 due to abi incompatibility between intercepted and non-intercepted functions. See the test case for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248325 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] NFC: Factor out platform-specific interceptorsTimur Iskhodzhanov2015-03-161-0/+12
| | | | | | | | Reviewed at http://reviews.llvm.org/D8321 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232377 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Remove MSanDR and supporting code.Evgeniy Stepanov2014-11-181-1/+1
| | | | | | | | | | | MSanDR is a dynamic instrumentation tool that can instrument the code (prebuilt libraries and such) that could not be instrumented at compile time. This code is unused (to the best of our knowledge) and unmaintained, and starting to bit-rot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222232 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] move mlock interceptor from asan/tsan/msan to common; no ↵Kostya Serebryany2014-08-251-2/+0
| | | | | | functionality change intended git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216407 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up for r215436: use SIZE_T for strlen and wcslen interceptors.Alexander Potapenko2014-08-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216184 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Use more appropriate return types for strlen/wcslen to avoid MSVC ↵Timur Iskhodzhanov2014-08-121-1/+1
| | | | | | warnings git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215436 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] i686-linux-android support.Evgeniy Stepanov2014-07-031-1/+3
| | | | | | | | | | | | | Large part of this change is required due to https://code.google.com/p/android/issues/detail?id=61799 dlsym() crashes when symbol resolution fails, which means we have to limit the interceptor list instead of relying on runtime detection. There are minor differencies in system headers, too. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212273 91177308-0d34-0410-b5e6-96231b3b80d8
* [sancov] Handle fork.Evgeniy Stepanov2014-06-041-0/+2
| | | | | | | | | | | Reset coverage data on fork(). For memory-mapped mode (coverage_direct=1) this helps avoid loss of data (before this change two processes would write to the same file simultaneously). For normal mode, this reduces coverage dump size, because PCs from the parent process are no longer inherited by the child. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210180 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] use some LIKELY/UNLIKELYKostya Serebryany2014-05-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208776 91177308-0d34-0410-b5e6-96231b3b80d8
* A set of trivial changes to support sanitizers on FreeBSD.Alexey Samsonov2014-03-041-1/+1
| | | | | | | Patch by Viktor Kutuzov! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202801 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Enable signal and sigaction interceptors on Android.Evgeniy Stepanov2014-02-131-1/+1
| | | | | | | Fixes AddressSanitizer.SignalTest breakage. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201330 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix a bunch of style issues.Evgeniy Stepanov2014-01-161-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199380 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Delete asan_intercepted_functions.h, move the code into ↵Alexander Potapenko2013-12-261-0/+61
| | | | | | | | | asan_interceptors.h Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=188. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198048 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Use the new sanitizer_interception.h header in all interceptors.Evgeniy Stepanov2013-12-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197808 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Delete the code related to static runtime on OS X.Alexander Potapenko2013-02-051-3/+0
| | | | | | | | Nuke lib/interception/mach_override. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174383 91177308-0d34-0410-b5e6-96231b3b80d8
* If the program is linked to a dynamic ASan runtime which is not present in ↵Alexander Potapenko2012-08-241-0/+1
| | | | | | | | | | DYLD_INSERT_LIBRARIES (which, in turn, is required for our interceptors to take effect), re-exec the program with DYLD_INSERT_LIBRARIES set. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162547 91177308-0d34-0410-b5e6-96231b3b80d8
* Lots of trivial changes to remove extraneous semicolons throughout ASan.Chandler Carruth2012-06-251-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159128 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] move all the rest re-implementations of libc functions from ASan ↵Alexey Samsonov2012-06-151-9/+0
| | | | | | runtime to common sanitizer runtime git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158519 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc ↵Alexey Samsonov2012-06-151-1/+0
| | | | | | implementations of functions. Move strchr to sanitizer_libc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158517 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Move internal_memcmp to common sanitizer libcAlexey Samsonov2012-06-141-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158450 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] add internal_memset and internal_strrchr to sanitizer_common/Alexey Samsonov2012-06-081-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158202 91177308-0d34-0410-b5e6-96231b3b80d8