| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
This patch is related to Issue 346: moar string interceptors: strstr, strcasestr, strcspn, strpbrk
As was suggested in original review http://reviews.llvm.org/D6056 a new "strict_string_checks" run-time flag introduced.
The flag support applied for existing common, asan, msan and tsan interceptors. New asan tests added.
Change by Maria Guseva reviewed in http://reviews.llvm.org/D7123
llvm-svn: 234187
|
|
|
|
|
|
|
|
|
| |
MetaMap::ResetRange/FreeRange rounds the range up to at least kMetaShadowSize.
This is requried for e.g. free(malloc(0)). However, munmap returns EINVAL
and do not unmap any memory when length arguments is equal to 0.
So don't free meta shadow in this case as well.
llvm-svn: 234145
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8544
llvm-svn: 233378
|
|
|
|
|
|
|
| |
If user does malloc(1<<30), the write to meta shadow
can cause excessive memory consumption.
llvm-svn: 233373
|
|
|
|
| |
llvm-svn: 233044
|
|
|
|
|
|
| |
This is a follow-up for r232936.
llvm-svn: 232937
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8324
llvm-svn: 232381
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8288
llvm-svn: 232074
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8176
llvm-svn: 232073
|
|
|
|
|
|
|
| |
The bug was uncovered by NegativeTests.MmapTest from
data-race-test suite, so port it as well.
llvm-svn: 232032
|
|
|
|
|
|
|
|
| |
Munmap interceptor did not reset meta shadow for the range,
and __tsan_java_move crashed because it encountered
non-zero meta shadow for the destination.
llvm-svn: 232029
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 230721
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: dvyukov, samsonov, kcc.
Subscribers: dsanders, mohit.bhakkad, Anand.Takale, llvm-commits.
Differential Revision: http://reviews.llvm.org/D7290
llvm-svn: 230002
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Sagar Thakur
Reviewers: dvyukov, samsonov, petarj, kcc, dsanders.
Subscribers: mohit.bhakkad, Anand.Takale, llvm-commits.
Differential Revision: http://reviews.llvm.org/D6291
llvm-svn: 229972
|
|
|
|
|
|
|
|
| |
Let each LibIgnore user (for now it's only TSan) manually go
through SuppressionContext and pass ignored library templates to
LibIgnore.
llvm-svn: 229924
|
|
|
|
|
|
|
| |
This is a re-application of r229554 restricted to Linux build only.
Apple still uses Makefile/autoconf to build Clang and sanitizers.
llvm-svn: 229756
|
|
|
|
|
|
|
|
|
| |
This reverts commit r229556.
Reverting this for now as internal apple builds rely on this
functionality.
llvm-svn: 229585
|
|
|
|
|
|
|
|
|
| |
Provide defaults for TSAN_COLLECT_STATS and TSAN_NO_HISTORY.
Replace #ifdef directives with #if. This fixes a bug introduced
in r229112, where building TSan runtime with -DTSAN_COLLECT_STATS=0
would still enable stats collection and reporting.
llvm-svn: 229581
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
In Go mode the background thread is not started (internal_thread_start is empty).
There is no sense in having this code compiled in.
Also removes dependency on sanitizer_linux_libcdep.cc which is good,
ideally Go runtime does not depend on libc at all.
llvm-svn: 229396
|
|
|
|
| |
llvm-svn: 229391
|
|
|
|
|
|
|
|
|
|
| |
Revision 229127 introduced a bug:
zero value is not OK for trace headers,
because stack0 needs constructor call.
Instead unmap the unused part of trace after
all ctors have been executed.
llvm-svn: 229263
|
|
|
|
|
|
|
|
| |
Go has a pending change to pass proper PCs to tsan:
https://go-review.googlesource.com/#/c/4902/
So now we can always subtract one from PCs.
llvm-svn: 229262
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to use only a small part of the trace with the default
value of history_size. However, the constructor writes to the whole trace.
It writes mostly zeros, so freshly mmaped memory will do.
The only non-zero field if mutex type used for debugging.
Reduces per-goroutine overhead by 8K.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
llvm-svn: 229127
|
|
|
|
| |
llvm-svn: 229120
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ContainsSameAccess optimization substantially reduces pressure
on trace by eliminating duplicate accesses. So now we can reduce
default trace size to reduce per-goroutine memory consumption.
Current default size is 64K events, new -- 32K events.
In either case user can change it with GORACE env var.
Reduces per-goroutine memory consumption from 356K to 226K.
llvm-svn: 229117
|
|
|
|
|
|
|
| |
Go does not use that.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
llvm-svn: 229116
|
|
|
|
|
|
|
| |
Go does not use that.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
llvm-svn: 229115
|
|
|
|
|
|
|
|
|
| |
Go does not have freed memory.
Reduces per-goroutine overhead from 455K to 356K.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
llvm-svn: 229113
|
|
|
|
|
|
|
| |
Issue 89: Uses a lot of memory for each goroutine
https://code.google.com/p/thread-sanitizer/issues/detail?id=89
llvm-svn: 229112
|
|
|
|
|
|
| |
strip_path_prefix was not stripped from file names.
llvm-svn: 229106
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7294
llvm-svn: 227959
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7233
llvm-svn: 227570
|
|
|
|
|
|
|
|
|
|
|
| |
If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17
llvm-svn: 227230
|
|
|
|
|
|
| |
required for mips64 and aarch64 ports
llvm-svn: 226829
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6968
llvm-svn: 226648
|
|
|
|
|
|
|
|
|
| |
MemoryAccess function consumes ~4K of stack in debug mode,
in significant part due to the unrolled loop.
And gtest gives only 4K of stack to death test
threads, which causes stack overflows in debug mode.
llvm-svn: 226644
|
|
|
|
| |
llvm-svn: 226636
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
TSAN_SHADOW_COUNT is defined to 4 in all environments.
Other values of TSAN_SHADOW_COUNT were never tested and
were broken by recent changes to shadow mapping.
Remove it as there is no reason to fix nor maintain it.
llvm-svn: 226466
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: timurrrr
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6890
llvm-svn: 225635
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 225111
|
|
|
|
| |
llvm-svn: 225110
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|