| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 224841
|
| |
|
|
| |
llvm-svn: 224840
|
| |
|
|
|
|
| |
Looks like we can't use atexit() during ASan initialization on Windows.
llvm-svn: 224839
|
| |
|
|
| |
llvm-svn: 224838
|
| |
|
|
|
|
|
|
|
| |
The current code leaves the first event in the trace part uninitialized
(from the previous thread). It can cause unpredictable behavior
during stack/mutexset restoration.
Initialize the first event to a fake harmless memory access.
llvm-svn: 224834
|
| |
|
|
|
|
|
|
| |
This is mostly useful for testing, as the only other way of specifying
activation options (Android system property) is system-wide and affects
concurrently running tests.
llvm-svn: 224824
|
| |
|
|
| |
llvm-svn: 224823
|
| |
|
|
| |
llvm-svn: 224822
|
| |
|
|
|
|
| |
File mapping offset was calculated by offsetting (uptr *) instead of (char *).
llvm-svn: 224821
|
| |
|
|
| |
llvm-svn: 224820
|
| |
|
|
|
|
| |
Ouch.
llvm-svn: 224819
|
| |
|
|
|
|
| |
coverage for the entire process as a single bit set, and if coverage_bitset=1 actually emit that bitset
llvm-svn: 224789
|
| |
|
|
| |
llvm-svn: 224763
|
| |
|
|
| |
llvm-svn: 224762
|
| |
|
|
|
|
| |
Usually we roll the variable declaration into the condition in cases like this.
llvm-svn: 224755
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Protect CommonFlags singleton by adding const qualifier to
common_flags() accessor. The only ways to modify the flags are
SetCommonFlagsDefaults(), ParseCommonFlagsFromString() and
OverrideCommonFlags() functions, which are only supposed to be
called during initialization.
Test Plan: regression test suite
Reviewers: kcc, eugenis, glider
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6741
llvm-svn: 224736
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6757
llvm-svn: 224724
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASan flag
As mentioned in
https://code.google.com/p/address-sanitizer/issues/detail?id=365, when the
re-exec that adds the required DYLD_INSERT_LIBRARIES variable fails, ASan
currently continues to run, but things are broken (some memory can be
overwritten, interceptors don't work, ...). This patch aborts if the execv()
fails and prints an error message that DYLD_INSERT_LIBRARIES is required. It
also removes the "alllow_reexec" flag, since using it causes the same issues.
Reviewed at http://reviews.llvm.org/D6752
llvm-svn: 224712
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NULL handler
Per
https://developer.apple.com/library/mac/documentation/Performance/Reference/GCD_libdispatch_Ref/index.html,
the dispatch_source_set_cancel_handler() API *can* be called with a NULL
handler. In that case, the libdispatch removes an already existing cancellation
handler, if there was one. ASan's interceptor always creates a new block that
always tries to call the original handler. In case the original block is NULL,
a segmentation fault happens. Let's fix that by not wrapping a NULL-block at
all.
It looks like all the other libdispatch APIs (which we intercept) do *not*
allow NULL. So it's really only the dispatch_source_set_cancel_handler one that
needs this fix.
Reviewed at http://reviews.llvm.org/D6747
llvm-svn: 224711
|
| |
|
|
|
|
| |
llvm-symbolizer in asan_symbolize.py
llvm-svn: 224710
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6755
llvm-svn: 224709
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6738
llvm-svn: 224708
|
| |
|
|
|
|
|
| |
stack0/mset0 contained bogus values from the previous thread
that used the same id
llvm-svn: 224702
|
| |
|
|
| |
llvm-svn: 224701
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6418
llvm-svn: 224700
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6737
llvm-svn: 224699
|
| |
|
|
|
|
| |
they are required to handle synchronization on volatile/final fields
llvm-svn: 224697
|
| |
|
|
|
|
| |
perf-critical function to a header. ALso set the coverage guard to 1 before the early return from CoverageData::Add
llvm-svn: 224660
|
| |
|
|
| |
llvm-svn: 224645
|
| |
|
|
|
|
|
|
|
|
| |
Add CommonFlags::SetDefaults() and CommonFlags::ParseFromString(),
so that this object can be easily tested. Enforce
that ParseCommonFlagsFromString() and SetCommonFlagsDefaults()
work only with singleton CommonFlags, shared across all sanitizer
runtimes.
llvm-svn: 224617
|
| |
|
|
|
|
|
|
|
|
|
| |
Now ASan deactivation doesn't modify common or ASan-specific runtime
flags. Flags stay constant after initialization, and "deactivation"
instead stashes initialized runtime state, and deactivates the
runtime. Activation then just restores the original state (possibly,
overriden by some activation flags provided in system property on
Android).
llvm-svn: 224614
|
| |
|
|
|
|
|
| |
ASan Quarantine can be reinitialized at activation/deactivation.
Make max_size_/min_size_ atomic.
llvm-svn: 224613
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Reduce the dependency of allocator code on runtime flags. Instead,
pass a bunch of options that configure allocator behavior at
initialization or re-initialization. That would allow us to
cleaner modify allocator behavior during a program execution
when ASan is activated or de-activated.
Test Plan: regression test suite
Reviewers: kcc
Subscribers: llvm-commits, eugenis
Differential Revision: http://reviews.llvm.org/D6711
llvm-svn: 224605
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Change the way ASan flag parsing is performed at activation: instead
of overwriting all ASan and common flags from the activation string,
ASan will now only override a handful of whitelisted flags.
This is a first step towards making runtime flags immutable after
initialization. I plan to re-factor the activation stragegy to
the following one:
- Parse commandline flags. Override the defaults from compile
definition, env var, etc. Flags are immutable at this point.
- Initiailize the runtime from commandline flags.
- If ASan needs to be started deactivated, stash the runtime
state in "asan_deactivated_flags" and deactivate the runtime.
- When ASan is activated, override "asan_deactivated_flags" with
activation flags, and use it to re-activate the runtime.
Test Plan: regression test suite
Reviewers: eugenis, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6709
llvm-svn: 224601
|
| |
|
|
| |
llvm-svn: 224600
|
| |
|
|
|
|
|
|
|
|
| |
clang does not like the definition of builtins. In order to work around this,
we use a SUN CC to redefine the generated name. However, this requires that we
account for the user label prefix. Rather than hard coding that into the file,
rely on the compiler to tell us the information and use the preprocessor to
generate the name as we do in the assembly routines. NFC.
llvm-svn: 224597
|
| |
|
|
| |
llvm-svn: 224577
|
| |
|
|
| |
llvm-svn: 224575
|
| |
|
|
|
|
| |
see the added comments for details, it's messy
llvm-svn: 224531
|
| |
|
|
|
|
|
| |
signal handler reads sa_sigaction when a concurrent sigaction call can modify it
as the result in could try to call SIG_DFL or a partially overwritten function pointer
llvm-svn: 224530
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The numbers in /proc/self/statm are in pages, not in fixed 4k units.
This fixes Linux/hard_rss_limit_mb_test.cc on my PowerPC64 box which
has 64k pages.
Reviewers: kcc, willschm
Reviewed By: willschm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6717
llvm-svn: 224522
|
| |
|
|
|
|
|
| |
currently deadlock detector reports effectively random stacks in report after flush
because it looks at old edges with wrong stacks
llvm-svn: 224519
|
| |
|
|
|
|
| |
and re-enable the test
llvm-svn: 224518
|
| |
|
|
|
|
|
|
| |
tctx==NULL crash observed during deadlock reporting.
There seems to be some bugs in the deadlock detector,
but it is still useful to be more robust during reporting.
llvm-svn: 224508
|
| |
|
|
|
|
| |
see the comment for details
llvm-svn: 224507
|
| |
|
|
|
|
|
|
|
|
|
| |
Do not define it for MIPS64 until its backend supports it.
See the bug report [1] for more information.
[1] http://llvm.org/bugs/show_bug.cgi?id=20098
Differential Revision: http://reviews.llvm.org/D6703
llvm-svn: 224488
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the strategy for building shared ASan runtime
and the way we test it:
- COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now
always build shared ASan runtime (it is the default on Android,
Windows and Mac, and not the default on Linux and FreeBSD).
- Platforms, which use static runtime by default now have
"check-asan-dynamic" testsuite. This testsuite contains instrumented
unit tests, and ASan lit tests, and runs them with shared ASan
runtime. This testsuite is *not* a part of "check-asan" and
*not* a part of "check-all", as adding 1000 more test cases, which
duplicate existing ones is costly. However, you're welcome to
add this command to your buildbot.
llvm-svn: 224470
|
| |
|
|
|
|
| |
lsan: speeds up lsan start-up time by ~25%
llvm-svn: 224469
|
| |
|
|
| |
llvm-svn: 224464
|
| |
|
|
| |
llvm-svn: 224450
|