| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
overwritten by user.
llvm-svn: 241876
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX states that "It shall be safe to destroy an initialized condition
variable upon which no threads are currently blocked", and later clarifies
"A condition variable can be destroyed immediately after all the threads
that are blocked on it are awakened) (in examples section). Tsan reported
such destruction as a data race.
Fixes https://llvm.org/bugs/show_bug.cgi?id=23616
Reviewed in http://reviews.llvm.org/D10693
llvm-svn: 241082
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
The new suppression type is called "race_top" and is matched only against top frame in report stacks.
This is required for situations when we want to suppress a race in a "thread pool" or "event loop" implementation.
If we simply use "race:ThreadPool::Execute" suppression, that can suppress everything in the program.
Reviewed in http://reviews.llvm.org/D10686
llvm-svn: 240949
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously tsan modelled dup2(oldfd, newfd) as write on newfd.
We hit several cases where the write lead to false positives:
1. Some software dups a closed pipe in place of a socket before closing
the socket (to prevent races actually).
2. Some daemons dup /dev/null in place of stdin/stdout.
On the other hand we have not seen cases when write here catches real bugs.
So model dup2 as read on newfd instead.
llvm-svn: 240687
|
|
|
|
| |
llvm-svn: 240633
|
|
|
|
|
|
|
|
|
| |
We see false reports between dlopen and dl_iterate_phdr.
This happens because tsan does not see dynamic linker
internal synchronization. Unpoison module names
in dl_iterate_phdr callback.
llvm-svn: 240576
|
|
|
|
|
|
| |
They are meaningless.
llvm-svn: 240539
|
|
|
|
|
|
|
| |
This happens only in corner cases, but we observed this on a real app.
See the test for description of the exact scenario that lead to unbounded memory consumption.
llvm-svn: 240535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.
CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments
Since I was already changing these calls, I changed ARCH and LIB into
ARCHS and LIBS to make it more clear that they're lists of arguments.
Reviewers: eugenis, samsonov, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10529
llvm-svn: 240120
|
|
|
|
|
|
|
|
| |
Meta shadow is compressing and we don't flush it,
so it makes sense to mark it as NOHUGEPAGE to not over-allocate memory.
On one program it reduces memory consumption from 5GB to 2.5GB.
llvm-svn: 240028
|
|
|
|
| |
llvm-svn: 239956
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change takes darwin-specific goop that was scattered around CMakeLists files and spread between add_compiler_rt_object_library and add_compiler_rt_darwin_object_library and moves it all under add_compiler_rt_object_library.
The goal of this is to try to push platform handling as low in the utility functions as possible.
Reviewers: rnk, samsonov
Reviewed By: rnk, samsonov
Subscribers: rnk, rsmith, llvm-commits
Differential Revision: http://reviews.llvm.org/D10250
llvm-svn: 239498
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D10213
llvm-svn: 239020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 238626
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
strpbrk.
Patch by Maria Guseva.
Differential Revision: http://reviews.llvm.org/D9017
llvm-svn: 238406
|
|
|
|
|
|
|
| |
Current code tries to find the dynamic TLS header to the left of the
TLS block without checking that it's not a static TLS allocation.
llvm-svn: 237495
|
|
|
|
|
|
| |
This is required for Java support, as real PCs don't work for Java.
llvm-svn: 236484
|
|
|
|
|
|
|
|
|
|
| |
We incorrectly replaced shadow slots
when the new value is not stronger than the old one.
The bug can lead to false negatives.
The bug was detected by Go race test suite:
https://github.com/golang/go/issues/10589
llvm-svn: 236008
|
|
|
|
| |
llvm-svn: 235960
|
|
|
|
| |
llvm-svn: 235958
|
|
|
|
|
|
|
|
| |
Embed UBSan runtime into TSan and MSan runtimes in the same as we do
in ASan. Extend UBSan test suite to also run tests for these
combinations.
llvm-svn: 235954
|
|
|
|
|
|
|
|
| |
For now tsan_cxx and msan_cxx contain only operator new/delete
replacements. In the future, when we add support for running UBSan+TSan
and UBSan+MSan, they will also contain bits ubsan_cxx runtime.
llvm-svn: 235928
|
|
|
|
| |
llvm-svn: 235906
|
|
|
|
|
|
|
|
|
|
| |
Fixes https://llvm.org/bugs/show_bug.cgi?id=23235
If pthread_create is followed by pthread_detach,
the new thread may not acquire synchronize with
the parent thread.
llvm-svn: 235293
|
|
|
|
|
|
|
| |
It was broken during flag parsing refactoring.
Enable test for the flag.
llvm-svn: 234878
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch is generated using clang-tidy misc-use-override check.
This command was used:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix \
-format
llvm-svn: 234680
|
|
|
|
|
|
|
| |
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: 234487
|
|
|
|
|
|
| |
sanitizer_posix.h
llvm-svn: 234418
|
|
|
|
| |
llvm-svn: 234410
|
|
|
|
|
|
| |
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=91
llvm-svn: 234394
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
only.
llvm-svn: 233042
|
|
|
|
| |
llvm-svn: 233038
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 230247
|