| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7253
llvm-svn: 227571
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7233
llvm-svn: 227570
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7172
llvm-svn: 227559
|
|
|
|
|
|
|
|
|
|
|
|
| |
A flexible way of describing MSan memory layout details on various
platforms. No significant functional changes, but the memory layout
description that you get at verbosity=1 looks slightly different.
This change includes stronger sanity checks than before.
The goal of this change is to allow more than 2 application memory
ranges for https://code.google.com/p/memory-sanitizer/issues/detail?id=76.
llvm-svn: 227192
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Reviewers: eugenis, kcc, samsonov, petarj
Subscribers: dsanders, sagar, lldb-commits
Differential Revision: http://reviews.llvm.org/D7194
llvm-svn: 227189
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7145
llvm-svn: 227106
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7144
llvm-svn: 227100
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By attaching an extra integer tag to heap origins, we are able
to distinguish between uninits
- created by heap allocation,
- created by heap deallocation (i.e. use-after-free),
- created by __msan_allocated_memory call,
- etc.
See https://code.google.com/p/memory-sanitizer/issues/detail?id=35.
llvm-svn: 226821
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7091
llvm-svn: 226801
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7089
llvm-svn: 226800
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7086
llvm-svn: 226799
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes 2 issues in origins arising from realloc() calls:
* In the in-place grow case origin for the new memory is not set at all.
* In the copy-realloc case __msan_memcpy is used, which unwinds stack from
inside the MSan runtime. This does not generally work (as we may be built
w/o frame pointers), and produces "bad" stack trace anyway, with several
uninteresting (internal) frames on top.
This change also makes realloc() honor "zeroise" and "poison_in_malloc" flags.
See https://code.google.com/p/memory-sanitizer/issues/detail?id=73.
llvm-svn: 226674
|
|
|
|
|
|
|
| |
Move a bunch of functions to a new source file and rename some of them for
consistency. No functional changes.
llvm-svn: 226673
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7083
llvm-svn: 226650
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6968
llvm-svn: 226648
|
|
|
|
|
|
|
| |
This change removes some debug output in asan_flags.cc that
was reading the verbosity level before all the flags were parsed.
llvm-svn: 226566
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7052
llvm-svn: 226554
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7051
llvm-svn: 226461
|
|
|
|
|
|
| |
Print a warning at verbosity=1 and higher instead of dying immediately.
llvm-svn: 226458
|
|
|
|
|
|
|
|
|
| |
InternalAlloc is quite complex and its behavior may depend on the values of
flags. As such, it should not be used while parsing flags.
Sadly, LowLevelAlloc does not support deallocation of memory.
llvm-svn: 226453
|
|
|
|
| |
llvm-svn: 226437
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6928
llvm-svn: 225986
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6929
llvm-svn: 225688
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6926
llvm-svn: 225686
|
|
|
|
|
|
|
|
|
|
|
| |
This mirrors r225239 to all the rest sanitizers:
ASan, DFSan, LSan, MSan, TSan, UBSan.
Now the runtime flag type, name, default value and
description is located in the single place in the
.inc file.
llvm-svn: 225327
|
|
|
|
|
|
|
| |
Propagate -DSANITIZER_DEBUG definition to unit tests.
Make sure unit tests depend on compiler-rt headers.
llvm-svn: 225298
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initialization.""
Fix test failures by introducing CommonFlags::CopyFrom() to make sure
compiler doesn't insert memcpy() calls into runtime code.
Original commit message:
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.
llvm-svn: 225088
|
|
|
|
|
|
|
|
|
|
| |
We've got some internal users that either aren't compatible with this or
have found a bug with it. Either way, this is an isolated cleanup and so
I'm reverting it to un-block folks while we investigate. Alexey and
I will be working on fixing everything up so this can be re-committed
soon. Sorry for the noise and any inconvenience.
llvm-svn: 225079
|
|
|
|
|
|
|
|
| |
This is a re-commit of r224838 + r224839, previously reverted in r224850.
Test failures were likely (still can not reproduce) caused by two lit tests
using the same name for an intermediate build target.
llvm-svn: 224853
|
|
|
|
|
|
| |
Flaky failures on the build bots.
llvm-svn: 224850
|
|
|
|
| |
llvm-svn: 224838
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6738
llvm-svn: 224708
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
pthread_getspecific is not async-signal-safe.
MsanThread pointer is now stored in a TLS variable, and the TSD slot
is used only for its destructor, and never from a signal handler.
This should fix intermittent CHECK failures in MsanTSDSet.
llvm-svn: 224423
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Intercept wcstod, wcstof, wcstold, wcstol, wcstoul, wcstoll, wcstoull.
llvm-svn: 223650
|
|
|
|
|
|
| |
compiler-rt part
llvm-svn: 223314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, all origin ids were "chained" origins, i.e values of
ChainedOriginDepot. This added a level of indirection for simple
stack and heap allocation, which were represented as chains of
length 1. This costs both RAM and CPU, but provides a joined 2**29
origin id space. It also made function (any instrumented function)
entry non-async-signal-safe, but that does not really matter because
memory stores in track-origins=2 mode are not async-signal-safe anyway.
With this change, the type of the origin is encoded in origin id.
See comment in msan_origin.h for more details. This reduces chained and stack
origin id range to 2**28 each, but leaves extra 2**31 for heap origins.
This change should not have any user-visible effects.
llvm-svn: 223233
|
|
|
|
|
|
| |
It has been fixed a long time ago.
llvm-svn: 223226
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6387
llvm-svn: 222919
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6417
llvm-svn: 222885
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6404
llvm-svn: 222822
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6403
llvm-svn: 222818
|
|
|
|
| |
llvm-svn: 222762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memset. Fixes PR 21579
Summary:
Exactly what the title says. I've tested this change against the libc++ test failures and it solves all of them. The check-msan rule also still passes.
I'm not sure why it called memset originally.
I can add tests if requested but currently there are no tests involving wide chars and they are a c++11 features.
Reviewers: kcc, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6352
llvm-svn: 222673
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D5906
llvm-svn: 222388
|
|
|
|
|
|
|
|
|
|
| |
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
|