|
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, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, 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, 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 |
|
| #
fd7ec90a |
| 25-Sep-2020 |
Roland McGrath <[email protected]> |
[lsan] On Fuchsia, don't use atexit hook for leak checks
This is a re-land of https://reviews.llvm.org/D86171 with fix.
Fuchsia's system libraries are instrumented and use the lsan allocator for in
[lsan] On Fuchsia, don't use atexit hook for leak checks
This is a re-land of https://reviews.llvm.org/D86171 with fix.
Fuchsia's system libraries are instrumented and use the lsan allocator for internal purposes. So leak checking needs to run after all atexit hooks and after the system libraries' internal exit-time hooks. The <zircon/sanitizer.h> hook API calls the __sanitizer_process_exit_hook function at exactly the right time.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D88248
show more ...
|
| #
595d340d |
| 11-Feb-2022 |
Dmitry Vyukov <[email protected]> |
sanitizer_common: make internal/external headers compatible
This is a follow up to 4f3f4d672254 ("sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch") which fixes a si
sanitizer_common: make internal/external headers compatible
This is a follow up to 4f3f4d672254 ("sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch") which fixes a similar problem for msan build.
I am getting the following error compiling a unit test for code that uses sanitizer_common headers and googletest transitively includes sanitizer interface headers:
In file included from third_party/gwp_sanitizers/singlestep_test.cpp:3: In file included from sanitizer_common/sanitizer_common.h:19: sanitizer_interface_internal.h:41:5: error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments') } __sanitizer_sandbox_arguments; common_interface_defs.h:39:3: note: previous definition is here } __sanitizer_sandbox_arguments;
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D119546
show more ...
|
| #
261d6e05 |
| 14-May-2021 |
Fangrui Song <[email protected]> |
[sanitizer] Simplify __sanitizer::BufferedStackTrace::UnwindImpl implementations
Intended to be NFC. D102046 relies on the refactoring for stack boundaries.
|
| #
0e92cbd6 |
| 05-Apr-2021 |
Nico Weber <[email protected]> |
Revert "[sanitizer] Simplify GetTls with dl_iterate_phdr on Linux"
This reverts commit ec575e3b0a462ff7a3d23d0f39a22147606050de. Still doesn't work, see https://crbug.com/1196037
|
| #
ec575e3b |
| 04-Apr-2021 |
Fangrui Song <[email protected]> |
[sanitizer] Simplify GetTls with dl_iterate_phdr on Linux
This was reverted by f176803ef1f4050a350e01868d64fe09a674d3bf due to Ubuntu 16.04 x86-64 glibc 2.23 problems. This commit additionally calls
[sanitizer] Simplify GetTls with dl_iterate_phdr on Linux
This was reverted by f176803ef1f4050a350e01868d64fe09a674d3bf due to Ubuntu 16.04 x86-64 glibc 2.23 problems. This commit additionally calls `__tls_get_addr({modid,0})` to work around the dlpi_tls_data==NULL issues for glibc<2.25 (https://sourceware.org/bugzilla/show_bug.cgi?id=19826)
GetTls is the range of
* thread control block and optional TLS_PRE_TCB_SIZE * static TLS blocks plus static TLS surplus
On glibc, lsan requires the range to include `pthread::{specific_1stblock,specific}` so that allocations only referenced by `pthread_setspecific` can be scanned.
This patch uses `dl_iterate_phdr` to collect TLS blocks. Find the one with `dlpi_tls_modid==1` as one of the initially loaded module, then find consecutive ranges. The boundaries give us addr and size.
This allows us to drop the glibc internal `_dl_get_tls_static_info` and `InitTlsSize` entirely. Use the simplified method with non-Android Linux for now, but in theory this can be used with *BSD and potentially other ELF OSes.
This simplification enables D99566 for TLS Variant I architectures.
See https://reviews.llvm.org/D93972#2480556 for analysis on GetTls usage across various sanitizers.
Differential Revision: https://reviews.llvm.org/D98926
show more ...
|
| #
f176803e |
| 02-Apr-2021 |
Nico Weber <[email protected]> |
Revert "[sanitizer] Simplify GetTls with dl_iterate_phdr"
This reverts commit 9be8f8b34d9b150cd1811e3556fe9d0cd735ae29. This breaks tsan on Ubuntu 16.04:
$ cat tiny_race.c #include <pthread
Revert "[sanitizer] Simplify GetTls with dl_iterate_phdr"
This reverts commit 9be8f8b34d9b150cd1811e3556fe9d0cd735ae29. This breaks tsan on Ubuntu 16.04:
$ cat tiny_race.c #include <pthread.h> int Global; void *Thread1(void *x) { Global = 42; return x; } int main() { pthread_t t; pthread_create(&t, NULL, Thread1, NULL); Global = 43; pthread_join(t, NULL); return Global; } $ out/gn/bin/clang -fsanitize=thread -g -O1 tiny_race.c --sysroot ~/src/chrome/src/build/linux/debian_sid_amd64-sysroot/ $ docker run -v $PWD:/foo ubuntu:xenial /foo/a.out FATAL: ThreadSanitizer CHECK failed: ../../compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp:447 "((thr_beg)) >= ((tls_addr))" (0x7fddd76beb80, 0xfffffffffffff980) #0 <null> <null> (a.out+0x4960b6) #1 <null> <null> (a.out+0x4b677f) #2 <null> <null> (a.out+0x49cf94) #3 <null> <null> (a.out+0x499bd2) #4 <null> <null> (a.out+0x42aaf1) #5 <null> <null> (libpthread.so.0+0x76b9) #6 <null> <null> (libc.so.6+0x1074dc)
(Get the sysroot from here: https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/500976182686961e34974ea7bdc0a21fca32be06/debian_sid_amd64_sysroot.tar.xz)
Also reverts follow-on commits: This reverts commit 58c62fd9768594ec8dd57e8320ba2396bf8b87e5. This reverts commit 31e541e37587100a5b21378380f54c028fda2d04.
show more ...
|
| #
9be8f8b3 |
| 26-Mar-2021 |
Fangrui Song <[email protected]> |
[sanitizer] Simplify GetTls with dl_iterate_phdr
GetTls is the range of
* thread control block and optional TLS_PRE_TCB_SIZE * static TLS blocks plus static TLS surplus
On glibc, lsan requires the
[sanitizer] Simplify GetTls with dl_iterate_phdr
GetTls is the range of
* thread control block and optional TLS_PRE_TCB_SIZE * static TLS blocks plus static TLS surplus
On glibc, lsan requires the range to include `pthread::{specific_1stblock,specific}` so that allocations only referenced by `pthread_setspecific` can be scanned.
This patch uses `dl_iterate_phdr` to collect TLS ranges. Find the one with `dlpi_tls_modid==1` as one of the initially loaded module, then find consecutive ranges. The boundaries give us addr and size.
This allows us to drop the glibc internal `_dl_get_tls_static_info` and `InitTlsSize` entirely. Use the simplified method with non-Android Linux for now, but in theory this can be used with *BSD and potentially other ELF OSes.
In the future, we can move `ThreadDescriptorSize` code to lsan (and consider intercepting `pthread_setspecific`) to avoid hacks in generic code.
See https://reviews.llvm.org/D93972#2480556 for analysis on GetTls usage across various sanitizers.
Differential Revision: https://reviews.llvm.org/D98926
show more ...
|
| #
60913ebc |
| 21-Oct-2020 |
Vitaly Buka <[email protected]> |
[NFC][LSAN] Use InitializeCommonFlags in LSAN
|
| #
f161e84c |
| 23-Sep-2020 |
Nikita Popov <[email protected]> |
Revert "[lsan] On Fuchsia, don't use atexit hook for leak checks"
This reverts commit 0caad9fe441d5ee562e96d8b30b5574b492a933a. This reverts commit c96d0cceb684fa176b51d7df5f4f8370e2c983f4.
Causes
Revert "[lsan] On Fuchsia, don't use atexit hook for leak checks"
This reverts commit 0caad9fe441d5ee562e96d8b30b5574b492a933a. This reverts commit c96d0cceb684fa176b51d7df5f4f8370e2c983f4.
Causes linker errors which were not fixed by the subsequent commit either:
/home/nikic/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:503: error: undefined reference to '__asan::InstallAtExitCheckLeaks()'
show more ...
|
| #
0caad9fe |
| 23-Sep-2020 |
Roland McGrath <[email protected]> |
[lsan] On Fuchsia, don't use atexit hook for leak checks
Fuchsia's system libraries are instrumented and use the lsan allocator for internal purposes. So leak checking needs to run after all atexit
[lsan] On Fuchsia, don't use atexit hook for leak checks
Fuchsia's system libraries are instrumented and use the lsan allocator for internal purposes. So leak checking needs to run after all atexit hooks and after the system libraries' internal exit-time hooks. The <zircon/sanitizer.h> hook API calls the __sanitizer_process_exit_hook function at exactly the right time.
Reviewed By: vitalybuka, phosek
Differential Revision: https://reviews.llvm.org/D86171
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc3 |
|
| #
2d7fd38c |
| 05-Sep-2020 |
Fangrui Song <[email protected]> |
[sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks
D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee `*_default_options` are always defined. The weak attributes o
[sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks
D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee `*_default_options` are always defined. The weak attributes on the `__{asan,lsan,msan,ubsan}_default_options` declarations can thus be removed.
`MaybeCall*DefaultOptions` no longer need nullptr checks, so their call sites can just be replaced by `__*_default_options`.
Reviewed By: #sanitizers, vitalybuka
Differential Revision: https://reviews.llvm.org/D87175
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
| #
90a10f00 |
| 28-Jan-2020 |
Roland McGrath <[email protected]> |
[lsan] Support LeakSanitizer runtime on Fuchsia
Support LeakSanitizer runtime on Fuchsia.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D72887
|
| #
2533bc23 |
| 28-Jan-2020 |
Petr Hosek <[email protected]> |
Revert "[lsan] Support LeakSanitizer runtime on Fuchsia"
This reverts commit d59e3429f3a6291416e7eb99184448dfe685b77a.
|
| #
d59e3429 |
| 28-Jan-2020 |
Roland McGrath <[email protected]> |
[lsan] Support LeakSanitizer runtime on Fuchsia
Support LeakSanitizer runtime on Fuchsia.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D72887
|
| #
38fd1806 |
| 25-Jan-2020 |
Roland McGrath <[email protected]> |
[lsan] Factor pthread-specific assumptions out of thread tracking code
This is a small refactoring to prepare for porting LSan to Fuchsia. Factor out parts of lsan_thread.{cpp,h} that don't apply to
[lsan] Factor pthread-specific assumptions out of thread tracking code
This is a small refactoring to prepare for porting LSan to Fuchsia. Factor out parts of lsan_thread.{cpp,h} that don't apply to Fuchsia. Since existing supported systems are POSIX-based, the affected code is moved to lsan_posix.{cpp.h}.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D73309
show more ...
|
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
| #
d39e7e2c |
| 02-Oct-2019 |
Vitaly Buka <[email protected]> |
[compiler-rt] Use GetNextInstructionPc in signal handlers
Summary: All other stack trace callers assume that PC contains return address. HWAsan already use GetNextInstructionPc in similar code.
PR4
[compiler-rt] Use GetNextInstructionPc in signal handlers
Summary: All other stack trace callers assume that PC contains return address. HWAsan already use GetNextInstructionPc in similar code.
PR43339
Reviewers: eugenis, kcc, jfb
Subscribers: dexonsmith, dberris, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68313
llvm-svn: 373529
show more ...
|
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5 |
|
| #
c0fa6322 |
| 11-Sep-2019 |
Vitaly Buka <[email protected]> |
Remove NOLINTs from compiler-rt
llvm-svn: 371687
|
|
Revision tags: llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
| #
ae1fc9ba |
| 01-Aug-2019 |
Nico Weber <[email protected]> |
compiler-rt: Rename .cc file in lib/lsan to .cpp
Like r367463, but for lsan.
llvm-svn: 367561
|