| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ucrtbase.dll appears to be built with some kind of cross-module
inlining, because there are calls to imported Heap* routines sprinkled
throughout the code. This inlining defeats our attempts to hotpatch
malloc, _malloc_base, and related functions. Failing to intercept an
allocation or deallocation results in a crash when the program attempts
to deallocate or reallocate memory with the wrong allocator.
This change patches the IAT of ucrtbase.dll to replace the addresses of
the imported Heap* functions with implementations provided by ASan. We
don't globally intercept the win32 Heap* functions because they are
typically used by system DLLs that run before ASan initializes.
Eventually, we may want to intercept them, but for now I think this is
the minimal change that will keep ASan stable.
Reviewers: samsonov
Differential Revision: http://reviews.llvm.org/D18413
llvm-svn: 264327
|
|
|
|
|
|
| |
Reduces number of test failures in check-asan-dynamic with VS 2015.
llvm-svn: 264061
|
|
|
|
| |
llvm-svn: 264060
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 264013
|
|
|
|
|
|
|
|
|
| |
In VS 2015, the memset fill parameter is zero extended from one byte
instead of being copied wholesale.
The issue reproduces with existing tests if you use VS2015.
llvm-svn: 263966
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17896
llvm-svn: 262770
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"I am the punishment of God... If [autoconf] had not committed great sins, God would not have sent a punishment like me upon [it]."
-Genghis Khan
Reviewers: chandlerc, grosbach, bob.wilson, zaks.anna, kubabrecka, samsonov, echristo
Subscribers: iains, llvm-commits
Differential Revision: http://reviews.llvm.org/D16473
llvm-svn: 258863
|
|
|
|
| |
llvm-svn: 253608
|
|
|
|
|
|
|
|
| |
Define WIN32_LEAN_AND_MEAN before including Windows.h. This is already being
done in some places. This does it more broadly. This permits building ASAN on
Linux for Winndows, as well as reduces the amount of included declarations.
llvm-svn: 251649
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 248325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASan uses GetProcAddress to get the address of malloc so it can patch
it. Newer versions of Windows make GetProcAddress initialize the DLL
before returning a function pointer into it. That's perfectly
reasonable, but ASan needs to finish patching malloc before CRT
initialization. So now we roll our own GetProcAddress.
Fixes PR24237
Based on a patch by David Major
Originally written by David Major as part of:
https://hg.mozilla.org/mozilla-central/file/tip/toolkit/xre/WindowsCrtPatch.h
llvm-svn: 245377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.
CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments
Since I was already changing these calls, I changed ARCH and LIB into
ARCHS and LIBS to make it more clear that they're lists of arguments.
Reviewers: eugenis, samsonov, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10529
llvm-svn: 240120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change takes darwin-specific goop that was scattered around CMakeLists files and spread between add_compiler_rt_object_library and add_compiler_rt_darwin_object_library and moves it all under add_compiler_rt_object_library.
The goal of this is to try to push platform handling as low in the utility functions as possible.
Reviewers: rnk, samsonov
Reviewed By: rnk, samsonov
Subscribers: rnk, rsmith, llvm-commits
Differential Revision: http://reviews.llvm.org/D10250
llvm-svn: 239498
|
|
|
|
|
|
|
|
| |
passed to BindIoCompletionCallback
This also simplifies how we handle QueueUserWorkItem
llvm-svn: 232499
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D8321
llvm-svn: 232377
|
|
|
|
|
|
|
|
|
| |
This reverts commit r229556.
Reverting this for now as internal apple builds rely on this
functionality.
llvm-svn: 229585
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Detect Android toolchain target arch and set correct runtime library name.
* Merged a lot of Android and non-Android code paths.
* Android is only supported in standalone build of compiler-rt now.
* Linking lsan-common in ASan-Android (makes lsan annotations work).
* Relying on -fsanitize=address linker flag when building tests (again,
unification with non-Android path).
* Runtime library moved from lib/asan to lib/linux.
llvm-svn: 218605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This finishes support for ASAN on MSVC2012.
Test Plan: |ninja check-asan| passes locally with this on MSVC2012.
Reviewers: timurrrr
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5494
llvm-svn: 218465
|
|
|
|
| |
llvm-svn: 216382
|
|
|
|
| |
llvm-svn: 216265
|
|
|
|
|
|
| |
__interception::GetRealFunctionAddress (follow-up to r215707)
llvm-svn: 215722
|
|
|
|
|
|
| |
re-written soon
llvm-svn: 215707
|
|
|
|
| |
llvm-svn: 212979
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D4418
llvm-svn: 212693
|
|
|
|
| |
llvm-svn: 210028
|
|
|
|
| |
llvm-svn: 210027
|
|
|
|
|
|
|
|
| |
wrappers too; wrap strlen() in DLLs
Reviewed at http://reviews.llvm.org/D3871
llvm-svn: 209427
|
|
|
|
|
|
|
|
| |
orig_old_func parameter to be zero
Reviewed at http://reviews.llvm.org/D3798
llvm-svn: 208989
|
|
|
|
|
|
| |
Kutuzov
llvm-svn: 202009
|
|
|
|
| |
llvm-svn: 201547
|
|
|
|
| |
llvm-svn: 200485
|
|
|
|
| |
llvm-svn: 200483
|
|
|
|
|
|
| |
VS2013 too
llvm-svn: 200482
|
|
|
|
|
|
| |
the VS2013 RTL
llvm-svn: 200366
|
|
|
|
| |
llvm-svn: 197806
|
|
|
|
| |
llvm-svn: 196506
|
|
|
|
|
|
|
|
| |
INTERCEPT_FUNCTION_VER.
This is a workaround for clang-format bug (PR17874).
llvm-svn: 194468
|
|
|
|
|
|
|
|
|
|
| |
CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib
The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code.
The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime.
llvm-svn: 194199
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: eugenis, dvyukov
Reviewed By: dvyukov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1937
llvm-svn: 192774
|
|
|
|
|
|
|
| |
versioned symbols can not be linked into dynamic library w/o linker script
also simplifies code as side effect
llvm-svn: 191056
|
|
|
|
|
|
| |
Windows
llvm-svn: 190411
|
|
|
|
|
|
|
|
|
|
| |
libpthread is weird:
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000b9b0 T pthread_cond_init@@GLIBC_2.3.2
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000c720 T pthread_cond_init@GLIBC_2.2.5
let's do it with @@ for now
we can always introduce more macros parameters later
llvm-svn: 189788
|
|
|
|
|
|
| |
android does not have dlvsym
llvm-svn: 189781
|
|
|
|
| |
llvm-svn: 189767
|
|
|
|
|
|
|
|
| |
appending the __DARWIN_ALIAS() version suffixes to function names on Darwin.
This should fix asan/lit_tests/wait.cc under ASan.
llvm-svn: 182259
|
|
|
|
|
|
|
|
| |
ThreadLister is a Linux-specific class for obtaining the thread IDs of a process from procfs (/proc/<pid>/task/). It will be used by leak checking code.
Also add several syscall wrappers which will be required by the same code that uses ThreadLister, but are not used in ThreadLister itself.
Patch by Sergey Matveev
llvm-svn: 176179
|
|
|
|
|
|
|
|
|
|
| |
asan_intercepted_functions.h
that had been used on OS X only.
The INTERCEPTOR() macro on OS X is now responsible for declaring the wrapped function, the wrapper and the
pair of pointers to them in __DATA,__interposition section. Thus adding an interceptor requires editing a single file now.
llvm-svn: 175740
|
|
|
|
| |
llvm-svn: 175140
|
|
|
|
| |
llvm-svn: 174600
|