|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
97b4e631 |
| 02-Dec-2021 |
Dmitry Vyukov <[email protected]> |
tsan: fix false positives in dynamic libs with static tls
The added test demonstrates loading a dynamic library with static TLS. Such static TLS is a hack that allows a dynamic library to have fast
tsan: fix false positives in dynamic libs with static tls
The added test demonstrates loading a dynamic library with static TLS. Such static TLS is a hack that allows a dynamic library to have faster TLS, but it can be loaded only iff all threads happened to allocate some excess of static TLS space for whatever reason. If it's not the case loading fails with:
dlopen: cannot load any more object with static TLS
We used to produce a false positive because dlopen will write into TLS of all existing threads to initialize/zero TLS region for the loaded library. And this appears to be racing with initialization of TLS in the thread since we model a write into the whole static TLS region (we don't what part of it is currently unused):
WARNING: ThreadSanitizer: data race (pid=2317365) Write of size 1 at 0x7f1fa9bfcdd7 by main thread: 0 memset 1 init_one_static_tls 2 __pthread_init_static_tls [[ this is where main calls dlopen ]] 3 main Previous write of size 8 at 0x7f1fa9bfcdd0 by thread T1: 0 __tsan_tls_initialization
Fix this by ignoring accesses during dlopen.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D114953
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
40067b88 |
| 18-Aug-2021 |
Michael Jones <[email protected]> |
[compiler-rt] change internal internal libc invariants
llvm-libc is expected to be built with sanitizers and not use interceptors in the long run. For now though, we have a hybrid process, where fun
[compiler-rt] change internal internal libc invariants
llvm-libc is expected to be built with sanitizers and not use interceptors in the long run. For now though, we have a hybrid process, where functions implemented in llvm-libc are instrumented, and glibc fills and sanitizer interceptors fill in the rest.
Current sanitizers have an invariant that the REAL(...) function called from inside of an interceptor is uninstrumented. A lot of interceptors call strlen() in order to figure out the size of the region to check/poison. Switch these callsites over to the internal, unsanitized implementation.
Reviewed By: hctim, vitalybuka
Differential Revision: https://reviews.llvm.org/D108316
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3 |
|
| #
ad294e57 |
| 08-Mar-2021 |
Alex Richardson <[email protected]> |
[sanitizers] Fix interception of GLibc regexec
Previously, on GLibc systems, the interceptor was calling __compat_regexec (regexec@GLIBC_2.2.5) insead of the newer __regexec (regexec@GLIBC_2.3.4). T
[sanitizers] Fix interception of GLibc regexec
Previously, on GLibc systems, the interceptor was calling __compat_regexec (regexec@GLIBC_2.2.5) insead of the newer __regexec (regexec@GLIBC_2.3.4). The __compat_regexec strips the REG_STARTEND flag but does not report an error if other flags are present. This can result in infinite loops for programs that use REG_STARTEND to find all matches inside a buffer (since ignoring REG_STARTEND means that the search always starts from the first character).
The underlying issue is that GLibc's dlsym(RTLD_NEXT, ...) appears to always return the oldest versioned symbol instead of the default. This means it does not match the behaviour of dlsym(RTLD_DEFAULT, ...) or the behaviour documented in the manpage.
It appears a similar issue was encountered with realpath and worked around in 77ef78a0a5dbaa364529bd05ed7a7bd9a71dd8d4.
See also https://sourceware.org/bugzilla/show_bug.cgi?id=14932 and https://sourceware.org/bugzilla/show_bug.cgi?id=1319.
Fixes https://github.com/google/sanitizers/issues/1371
Reviewed By: #sanitizers, vitalybuka, marxin
Differential Revision: https://reviews.llvm.org/D96348
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
| #
3d4bba30 |
| 03-Sep-2020 |
Teresa Johnson <[email protected]> |
[MemProf] Memory profiling runtime support
See RFC for background: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html
Follow on companion to the clang/llvm instrumentation support in D8
[MemProf] Memory profiling runtime support
See RFC for background: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html
Follow on companion to the clang/llvm instrumentation support in D85948 and committed earlier.
This patch adds the compiler-rt runtime support for the memory profiling.
Note that much of this support was cloned from asan (and then greatly simplified and renamed). For example the interactions with the sanitizer_common allocators, error handling, interception, etc.
The bulk of the memory profiling specific code can be found in the MemInfoBlock, MemInfoBlockCache, and related classes defined and used in memprof_allocator.cpp.
For now, the memory profile is dumped to text (stderr by default, but honors the sanitizer_common log_path flag). It is dumped in either a default verbose format, or an optional terse format.
This patch also adds a set of tests for the core functionality.
Differential Revision: https://reviews.llvm.org/D87120
show more ...
|