| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
lsan: speeds up lsan start-up time by ~25%
llvm-svn: 224469
|
|
|
|
| |
llvm-svn: 224464
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Turn "allocator_may_return_null" common flag into an
Allocator::may_return_null bool flag. We want to make sure
that common flags are immutable after initialization. There
are cases when we want to change this flag in the allocator
at runtime: e.g. in unit tests and during ASan activation
on Android.
Test Plan: regression test suite, real-life applications
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6623
llvm-svn: 224148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current scheme of things, the call to ThreadStart() in the child
thread is not synchronized with the parent thread. So, if a pointer is passed to
pthread_create, there may be a window of time during which this pointer will not
be discoverable by LSan. I.e. the pthread_create interceptor has already
returneed and thus the pointer is no longer on the parent stack, but we don't
yet know the location of the child stack. This has caused bogus leak reports
(see http://llvm.org/bugs/show_bug.cgi?id=21621/).
This patch makes the pthread_create interceptor wait until the child thread is
properly registered before returning.
llvm-svn: 223419
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: No functionality change.
Test Plan: make check-all
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6472
llvm-svn: 223164
|
|
|
|
|
|
|
|
|
|
|
| |
Return a linked list of AddressInfo objects, instead of using an array of
these objects as an output parameter. This simplifies the code in callers
of this function (especially TSan).
Fix a few memory leaks from internal allocator, when the returned
AddressInfo objects were not properly cleared.
llvm-svn: 223145
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 222232
|
|
|
|
| |
llvm-svn: 220637
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introduce a BufferedStackTrace class, which owns this array.
Summary:
This change splits __sanitizer::StackTrace class into a lightweight
__sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace,
which owns it. This would allow us to simplify the interface of StackDepot,
and eventually merge __sanitizer::StackTrace with __tsan::StackTrace.
Test Plan: regression test suite.
Reviewers: kcc, dvyukov
Reviewed By: dvyukov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5985
llvm-svn: 220635
|
|
|
|
| |
llvm-svn: 219946
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
We may as well just use Symbolizer::GetOrInit() in all the cases.
Don't call Symbolizer::Get() early in tools initialization: these days
it doesn't do any important setup work, and we may as well create the
symbolizer the first time it's actually needed.
llvm-svn: 217558
|
|
|
|
| |
llvm-svn: 216459
|
|
|
|
| |
llvm-svn: 216454
|
|
|
|
|
|
|
|
|
|
| |
another sanitizer.
A user may run both LSan and LSan+ASan. It is weird to pass path to leak
suppression file (or other common sanitizer flags, like "verbosity") in
"LSAN_OPTIONS" in the first case and in "ASAN_OPTIONS" in the second case.
llvm-svn: 215949
|
|
|
|
| |
llvm-svn: 215380
|
|
|
|
|
|
|
| |
Suppression context might be used in multiple sanitizers working
simultaneously (e.g. LSan and UBSan) and not knowing about each other.
llvm-svn: 214831
|
|
|
|
|
|
| |
Remove corresponding bits from LSan and TSan runtimes. No functionality change.
llvm-svn: 214344
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 214343
|
|
|
|
|
|
|
|
|
|
| |
sanitizer_common.
Convert TSan and LSan to the new interface. More changes will follow:
1) "suppressions" should become a common runtime flag.
2) Code for parsing suppressions file should be moved to SuppressionContext::Init().
llvm-svn: 214334
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of Symbolizer::Init(path_to_external) in favor of
thread-safe Symbolizer::GetOrInit(), and use the latter version
everywhere. Implicitly depend on the value of external_symbolizer_path
runtime flag instead of passing it around manually.
No functionality change.
llvm-svn: 214005
|
|
|
|
|
|
|
|
|
|
| |
across sanitizers.
Get rid of ASAN_USE_PREINIT_ARRAY and LSAN_USE_PREINIT_ARRAY - just always
use .preinit_array if it's available. This mode seems stable enough, and
we've been relying on default values of these macro for a long time.
llvm-svn: 213980
|
|
|
|
| |
llvm-svn: 212322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The patch supports both the clang cross-compiler and native compiler
Patch by Kumar Sukhani <Kumar.Sukhani@imgtec.com>
Test Plan:
Kumar had the following asan test results when compiled on a MIPS board:
Expected Passes : 96
Expected Failures : 2
Unsupported Tests : 84
Unexpected Passes : 4
Unexpected Failures: 19
The list of unexpected failures can be found in the review.
Reviewers: kcc, petarj, dsanders
Reviewed By: kcc
Subscribers: farazs, kcc, llvm-commits
Differential Revision: http://reviews.llvm.org/D4208
llvm-svn: 211587
|
|
|
|
|
|
| |
Based on a patch by Stephan Bergmann.
llvm-svn: 210199
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3794
llvm-svn: 209856
|
|
|
|
|
|
|
|
| |
This commit broke the Windows build, where CMAKE_C_COMPILER can
compile and link with -march=armv7-a but the just-built-clang
cannot.
llvm-svn: 209851
|
|
|
|
|
|
|
|
|
|
|
|
| |
You can expect the sanitizers to be built under any of the following conditions:
1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM
2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target)
3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot
Differential Revision: http://reviews.llvm.org/D3794
llvm-svn: 209835
|
|
|
|
| |
llvm-svn: 209283
|
|
|
|
|
|
|
|
| |
Soon there will be an option to build compiler-rt parts as shared libraries
on Linux. Extracted from http://llvm-reviews.chandlerc.com/D3042
by Yuri Gribov.
llvm-svn: 205183
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The interceptors had code that after macro expansion ended up looking like
extern "C" void memalign()
__attribute__((weak, alias("__interceptor_memalign")));
extern "C" void __interceptor_memalign() {}
extern "C" void __interceptor___libc_memalign()
__attribute__((alias("memalign")));
That is,
* __interceptor_memalign is a function
* memalign is a weak alias to __interceptor_memalign
* __interceptor___libc_memalign is an alias to memalign
Both gcc and clang produce assembly that look like
__interceptor_memalign:
...
.weak memalign
memalign = __interceptor_memalign
.globl __interceptor___libc_memalign
__interceptor___libc_memalign = memalign
What it means in the end is that we have 3 symbols pointing to the
same position in the file, one of which is weak:
8: 0000000000000000 1 FUNC GLOBAL DEFAULT 1
__interceptor_memalign
9: 0000000000000000 1 FUNC WEAK DEFAULT 1 memalign
10: 0000000000000000 1 FUNC GLOBAL DEFAULT 1
__interceptor___libc_memalign
In particular, note that __interceptor___libc_memalign will always
point to __interceptor_memalign, even if we do link in a strong symbol
for memalign. In fact, the above code produces exactly the same binary
as
extern "C" void memalign()
__attribute__((weak, alias("__interceptor_memalign")));
extern "C" void __interceptor_memalign() {}
extern "C" void __interceptor___libc_memalign()
__attribute__((alias("__interceptor_memalign")));
If nothing else, this patch makes it more obvious what is going on.
llvm-svn: 204823
|
|
|
|
|
|
|
|
|
| |
Extend ParseFlag to accept the |description| parameter, add dummy values for all existing flags.
As the flags are parsed their descriptions are stored in a global linked list.
The tool can later call __sanitizer::PrintFlagDescriptions() to dump all the flag names and their descriptions.
Add the 'help' flag and make ASan, TSan and MSan print the flags if 'help' is set to 1.
llvm-svn: 204339
|
|
|
|
|
|
|
|
|
| |
code so it seems it should have more generic name and moved to a common scope.
Renamed to AdjustStackSize.
Patch by Viktor Kutuzov.
llvm-svn: 202011
|
|
|
|
|
|
| |
'compiler-rt' target encompassing them all.
llvm-svn: 201556
|
|
|
|
| |
llvm-svn: 201547
|
|
|
|
| |
llvm-svn: 201421
|
|
|
|
| |
llvm-svn: 201408
|
|
|
|
| |
llvm-svn: 201406
|
|
|
|
| |
llvm-svn: 201399
|
|
|
|
| |
llvm-svn: 201152
|
|
|
|
|
|
| |
operator delete[].
llvm-svn: 201016
|
|
|
|
| |
llvm-svn: 200748
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding the ARM RT sources to the CMake files, and enabling some
sanitizers to also build on ARM. This is far from supported or
production quality, but enabling it to build will get us errors
that we can actually fix.
Having said that, the Compiler-RT and the Asan libraries are
know to work on some variations of ARM.
llvm-svn: 200546
|
|
|
|
| |
llvm-svn: 199900
|
|
|
|
|
|
| |
idea), leave __lsan_is_turned_off
llvm-svn: 199304
|
|
|
|
|
|
| |
https://code.google.com/p/address-sanitizer/issues/detail?id=257
llvm-svn: 198932
|
|
|
|
|
|
| |
LeakSanitizerIsTurnedOffForTheCurrentProcess (leave the old variant for now for compatibility)
llvm-svn: 198921
|
|
|
|
|
|
|
|
| |
suppression matching.
This allows us to avoid retrieving file/line info for suppressed modules.
llvm-svn: 198025
|
|
|
|
|
|
|
| |
- introduce logging macros
- fix incorrect vector construction
llvm-svn: 198021
|
|
|
|
|
|
| |
Those methods were too damn bloated.
llvm-svn: 197978
|