| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=75
llvm-svn: 217908
|
|
|
|
|
|
| |
Most real programs setup much more than 1024 callbacks.
llvm-svn: 217713
|
|
|
|
|
|
|
| |
The second part of the fix of
https://code.google.com/p/thread-sanitizer/issues/detail?id=71
llvm-svn: 217031
|
|
|
|
|
|
| |
Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=74
llvm-svn: 216906
|
|
|
|
|
|
|
|
|
|
|
| |
There interceptors do not seem to be strictly necessary for tsan.
But we see cases where the interceptors consume 70% of execution time.
Memory blocks passed to fgetgrent_r are "written to" by tsan several times.
First, there is some recursion (getgrnam_r calls fgetgrent_r), and each
function "writes to" the buffer. Then, the same memory is "written to"
twice, first as buf and then as pwbufp (both of them refer to the same addresses).
llvm-svn: 216904
|
|
|
|
|
|
|
| |
Fixes issue
https://code.google.com/p/thread-sanitizer/issues/detail?id=71
llvm-svn: 216903
|
|
|
|
|
|
|
| |
Users expect synchronization between sigaction and arrival
of the signal. See the test for details.
llvm-svn: 216878
|
|
|
|
|
|
| |
functionality change intended
llvm-svn: 216407
|
|
|
|
|
|
|
|
|
|
| |
sanitizer_common.
Convert TSan and LSan to the new interface. More changes will follow:
1) "suppressions" should become a common runtime flag.
2) Code for parsing suppressions file should be moved to SuppressionContext::Init().
llvm-svn: 214334
|
|
|
|
|
|
| |
deadlocks when reporting bad unlock
llvm-svn: 212526
|
|
|
|
| |
llvm-svn: 212322
|
|
|
|
|
|
|
|
|
|
|
| |
user_alloc_usable_size.
The former used to crash with a null deref if it was given a not owned pointer,
while the latter returned 0. Now they both return 0. This is still not the best possible
behavior: it is better to print an error report with a stack trace, pointing
to the error in user code, as we do in ASan.
llvm-svn: 212112
|
|
|
|
|
|
| |
This is a resubmit of r211166 reverted due to osx breakage.
llvm-svn: 211264
|
|
|
|
|
|
| |
This reverts commit r211166. It broke public mac os x bots.
llvm-svn: 211206
|
|
|
|
| |
llvm-svn: 211166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
- eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26)
- eliminates contention in SyncTab
- eliminates contention in internal allocator during allocation of sync objects
- removes a bunch of ad-hoc code in java interface
- reduces java shadow from 2x to 1/2x
- allows to memorize heap block meta info for Java and Go
- allows to cleanup sync object meta info for Go
- which in turn enabled deadlock detector for Go
llvm-svn: 209810
|
|
|
|
|
|
|
|
|
|
| |
The refactoring makes suppressions more flexible
and allow to suppress based on arbitrary number of stacks.
In particular it fixes:
https://code.google.com/p/thread-sanitizer/issues/detail?id=64
"Make it possible to suppress deadlock reports by any stack (not just first)"
llvm-svn: 209757
|
|
|
|
|
|
|
|
|
|
|
| |
This way does not require a __sanitizer_cov_dump() call. That's
important on Android, where apps can be killed at arbitrary time.
We write raw PCs to disk instead of module offsets; we also write
memory layout to a separate file. This increases dump size by the
factor of 2 on 64-bit systems.
llvm-svn: 209653
|
|
|
|
|
|
|
|
| |
Move fflush and fclose interceptors to sanitizer_common.
Use a metadata map to keep information about the external locations
that must be updated when the file is written to.
llvm-svn: 208676
|
|
|
|
| |
llvm-svn: 208207
|
|
|
|
| |
llvm-svn: 207954
|
|
|
|
|
|
| |
Add move fopen/freopen interceptors from TSan to common.
llvm-svn: 207224
|
|
|
|
|
|
| |
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=56
llvm-svn: 207114
|
|
|
|
|
|
| |
fixes issue http://code.google.com/p/thread-sanitizer/issues/detail?id=57
llvm-svn: 206980
|
|
|
|
|
|
| |
hacks to TSan
llvm-svn: 206423
|
|
|
|
| |
llvm-svn: 205316
|
|
|
|
| |
llvm-svn: 205175
|
|
|
|
| |
llvm-svn: 204327
|
|
|
|
| |
llvm-svn: 203647
|
|
|
|
|
|
|
| |
Get rid of the context argument in UNPOISON_PARAM and INITIALIZE_RANGE.
Get rid of all the thread-local contexts in interceptors.
llvm-svn: 203119
|
|
|
|
| |
llvm-svn: 202972
|
|
|
|
| |
llvm-svn: 202813
|
|
|
|
|
|
|
| |
this fixes obscure false positives
see the comments and the test for details
llvm-svn: 202400
|
|
|
|
| |
llvm-svn: 202128
|
|
|
|
| |
llvm-svn: 202120
|
|
|
|
| |
llvm-svn: 202022
|
|
|
|
|
|
|
|
|
| |
code so it seems it should have more generic name and moved to a common scope.
Renamed to AdjustStackSize.
Patch by Viktor Kutuzov.
llvm-svn: 202011
|
|
|
|
| |
llvm-svn: 201069
|
|
|
|
| |
llvm-svn: 201015
|
|
|
|
|
|
|
| |
as required per core issue 1552 and warned about with
-Wimplicit-exception-spec-mismatch.
llvm-svn: 201014
|
|
|
|
|
|
|
|
| |
on file stream locks.
This should fix https://code.google.com/p/thread-sanitizer/issues/detail?id=47.
llvm-svn: 200922
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do not detect errno spoiling for SIGTERM,
because some SIGTERM handlers do spoil errno but reraise SIGTERM,
tsan reports false positive in such case.
It's difficult to properly detect this situation (reraise),
because in async signal processing case (when handler is called directly
from rtl_generic_sighandler) we have not yet received the reraised
signal; and it looks too fragile to intercept all ways to reraise a signal.
llvm-svn: 200742
|
|
|
|
|
|
|
|
|
|
|
| |
__sanitizer_kernel_* ones.
Also rename internal_sigaction() into internal_sigaction_norestorer(), as this function doesn't fully
implement the sigaction() functionality on Linux.
This change is a part of refactoring intended to have common signal handling behavior in all tools.
llvm-svn: 200535
|
|
|
|
|
|
| |
They seems to be unused, but cause maintenance pain.
llvm-svn: 200308
|
|
|
|
|
|
|
| |
allow SIGABRT to spoil errno, because some real programs
reset SIGABRT handler in the handler, re-raise SIGABRT and return from the handler
llvm-svn: 200304
|
|
|
|
|
|
|
| |
We left ignore_interceptors>0 when calling signal handlers
from blocking interceptors, this leads to missing synchronization in such signal handler.
llvm-svn: 200003
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently correct programs can deadlock after fork, because atomic operations and async-signal-safe calls are not async-signal-safe under tsan.
With this change:
- if a single-threaded program forks, the child continues running with verification enabled (the tsan background thread is recreated as well)
- if a multi-threaded program forks, then the child runs with verification disabled (memory accesses, atomic operations and interceptors are disabled); it's expected that it will exec soon anyway
- if the child tries to create more threads after multi-threaded fork, the program aborts with error message
- die_after_fork flag is added that allows to continue running, but all bets are off
http://llvm-reviews.chandlerc.com/D2614
llvm-svn: 199993
|
|
|
|
|
|
| |
pthread uses internal cache, we do not see synchronization in it
llvm-svn: 197982
|
|
|
|
|
|
|
|
| |
This is intended to address the following problem.
Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems.
Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization).
llvm-svn: 197979
|
|
|
|
|
|
|
| |
tsan was missing new fd's arrived from recvmsg(),
and thus was reporting false positives due to missed synchronization on the fd's
llvm-svn: 195914
|