| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 243797
|
|
|
|
|
|
| |
With r242975, liblog is only used on certain older platforms.
llvm-svn: 243139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, Android target had a logic of duplicating all sanitizer
output to logcat. This change extends it to all posix platforms via
the use of syslog, controlled by log_to_syslog flag. Enabled by
default on Android, off everywhere else.
A bit of cmake magic is required to allow Printf() to call a libc
function. I'm adding a stub implementation to support no-libc builds
like dfsan and safestack.
This is a second attempt. I believe I've fixed all the issues that
prompted the revert: Mac build, and all kinds of non-CMake builds
(there are 3 of those).
llvm-svn: 243051
|
|
|
|
|
|
| |
Breaks Mac build.
llvm-svn: 242978
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, Android target had a logic of duplicating all sanitizer
output to logcat. This change extends it to all posix platforms via
the use of syslog, controlled by log_to_syslog flag. Enabled by
default on Android, off everywhere else.
A bit of cmake magic is required to allow Printf() to call a libc
function. I'm adding a stub implementation to support no-libc builds
like dfsan and safestack.
llvm-svn: 242975
|
|
|
|
| |
llvm-svn: 242582
|
|
|
|
|
|
|
| |
On Android L, TSD destructors run 8 times instead of 4.
Back to 4 times on the current master branch (as well as on K).
llvm-svn: 240992
|
|
|
|
| |
llvm-svn: 240825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this patch, we have a flag to toggle displaying source locations in
the regular style:
file:line:column
or Visual Studio style:
file(line,column)
This way, they get picked up on the Visual Studio output window and one
can double-click them to get to that file location.
Reviewers: samsonov, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10113
llvm-svn: 239000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done by creating a named shared memory region, unlinking it
and setting up a private (i.e. copy-on-write) mapping of that instead
of a regular anonymous mapping. I've experimented with regular
(sparse) files, but they can not be scaled to the size of MSan shadow
mapping, at least on Linux/X86_64 and ext3 fs.
Controlled by a common flag, decorate_proc_maps, disabled by default.
This patch has a few shortcomings:
* not all mappings are annotated, especially in TSan.
* our handling of memset() of shadow via mmap() puts small anonymous
mappings inside larger named mappings, which looks ugly and can, in
theory, hit the mapping number limit.
llvm-svn: 238621
|
|
|
|
|
|
|
| |
While I'm here, fix a copy-paste bug so we get debug info for these
tests.
llvm-svn: 236505
|
|
|
|
|
|
|
| |
On Windows, we have to know if a memory to be protected is mapped or not.
On POSIX, Mprotect was semantically different from mprotect most people know.
llvm-svn: 234602
|
|
|
|
| |
llvm-svn: 234482
|
|
|
|
| |
llvm-svn: 234481
|
|
|
|
|
|
| |
sanitizer_posix.h
llvm-svn: 234418
|
|
|
|
| |
llvm-svn: 234410
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D8805
llvm-svn: 234150
|
|
|
|
|
|
| |
and SanitizerCommon.FileOps
llvm-svn: 232972
|
|
|
|
|
|
|
|
| |
OpenFile.
This is to fix mapping coverage files into memory on OSX.
llvm-svn: 232936
|
|
|
|
|
|
|
|
| |
They are currently still *not* used, "llvm-symbolizer" is still the default symbolizer on OS X.
Reviewed at http://reviews.llvm.org/D6588
llvm-svn: 232026
|
|
|
|
| |
llvm-svn: 231174
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D7867
llvm-svn: 231027
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that without SA_RESTORER flag, kernel ignores the handler. So tracer actually did not setup any handler.
Add SA_RESTORER flag when setting up handlers.
Add a test that causes SIGSEGV in stoptheworld callback.
Move SignalContext from asan to sanitizer_common to print better diagnostics about signal in the tracer thread.
http://reviews.llvm.org/D8005
llvm-svn: 230978
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SuppressionContext is no longer a singleton, shared by all sanitizers,
but a regular class. Each of ASan, LSan, UBSan and TSan now have their
own SuppressionContext, which only parses suppressions specific to
that sanitizer.
"suppressions" flag is moved away from common flags into tool-specific
flags, so the user now may pass
ASAN_OPTIONS=suppressions=asan_supp.txt LSAN_OPIONS=suppressions=lsan_supp.txt
in a single invocation.
llvm-svn: 230026
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This reverts commit r227633. SetEnv was prematurely deleted.
llvm-svn: 227665
|
|
|
|
| |
llvm-svn: 227633
|
|
|
|
|
|
| |
Print a warning at verbosity=1 and higher instead of dying immediately.
llvm-svn: 226458
|
|
|
|
|
|
|
| |
The new parser is a lot stricter about syntax, reports unrecognized
flags, and will make it easier to implemented some of the planned features.
llvm-svn: 226169
|
|
|
|
| |
llvm-svn: 225472
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6825
llvm-svn: 225443
|
|
|
|
| |
llvm-svn: 225111
|
|
|
|
| |
llvm-svn: 224858
|
|
|
|
| |
llvm-svn: 224822
|
|
|
|
| |
llvm-svn: 224820
|
|
|
|
|
|
| |
Ouch.
llvm-svn: 224819
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6418
llvm-svn: 224700
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Enabling COMPILER_RT_INCLUDE_TESTS and updating tests/sanitizer_allocator_test.cc to remove Allocator64 related tests for MIPS.
Reviewed By: samsonov
llvm-svn: 224101
|
|
|
|
|
|
|
|
| |
Adds 3 new suppression types, "interceptor_name", "interceptor_via_fun", "interceptor_via_lib".
Reviewed at http://reviews.llvm.org/D6280.
llvm-svn: 223508
|
|
|
|
|
|
|
|
| |
Extending SuppressionContext to add a HasSuppressionType method that tells whether a certain suppression type is currently used or not. It's a step to implement issue suppressions for ASan, see http://reviews.llvm.org/D6280.
Reviewed at http://reviews.llvm.org/D6443
llvm-svn: 222954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit introduces function __sanitizer::RenderFrame()
that allows to render the contents of AddressInfo (essentially, symbolized stack frame)
using the custom format string. This function can be used to
implement stack frame formatting for both ThreadSanitizer and
generic StackTrace::Print(), used in another places. This paves the
way towards allowing user to control the format of stack frames,
obtaining them in any format he desires, and/or enforcing the consistent
output from all sanitizers.
Test Plan: compiler-rt test suite
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6140
llvm-svn: 221409
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
__ANDROID__ is a define that comes from the toolchain when building
for Android targets. ANDROID has a different meaning. ANDROID is
defined for _every_ Android build, including those done for host
modules. For host modules, we want to build the regular Linux
sanitizers and builtins, not the one for Android devices. This hasn't
been a problem until now because we only just started building the
sanitizers for the host.
llvm-svn: 220203
|
|
|
|
|
|
|
|
|
|
| |
let's rename it to append_list_if
Doing s/append_if/append_list_if/, no functional change.
http://reviews.llvm.org/D5739
llvm-svn: 219860
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes 2 issues in the fast unwinder from r217079:
* A crash if a frame pointer points below current stack head, but
inside the current thread stack limits. That memory may be
unmapped. A check for this was lost in r217079.
* The last valid stack frame (the first one with an invalid next
frame pointer) is always interpreted as a GCC layout frame. This
results in garbled last PC in the (expected) case when the last
frame has LLVM layout.
llvm-svn: 219683
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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:
UBSan needs to check if memory snippet it's going to print resides
in addressable memory. Similar check might be helpful in ASan with
dump_instruction_bytes option (see http://reviews.llvm.org/D5167).
Instead of scanning /proc/self/maps manually, delegate this check to
the OS kernel: try to write this memory in a syscall and assume that
memory is inaccessible if the syscall failed (e.g. with EFAULT).
Fixes PR20721.
Test Plan: compiler-rt test suite
Reviewers: eugenis, glider
Reviewed By: glider
Subscribers: emaste, ygribov, llvm-commits, glider, rsmith
Differential Revision: http://reviews.llvm.org/D5253
llvm-svn: 217971
|