-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/ui/sanitize/leak.rs fails on Linux with sanitizers = true
#111073
Comments
Been running into this for a while as well. This breaks both the leak sanitizer in @danakj Did you find out anything that could be helpful here yet? |
Sorry no I have not looked further. For Chromium, we ended up using Clang's sanitizer runtimes and just making empty archive placeholders for the Rust ones (as we can't have both anyway). |
Backtrace:
We can see that we end up calling |
@rustbot label A-sanitizers |
git clone https://github.com/bytecodealliance/rustix
cd rustix
rustup override set nightly
RUSTFLAGS="-Z sanitizer=leak" cargo build Output:
|
Disabled LeakSanitizer due to upstream issue: rust-lang/rust#111073
When linking a static sanitizer runtime clang also adds
|
Fix rust-lang#111073 by checking if `-Zexport-executable-symbols` is passed when LeakSanitizer is enabled.
Fix rust-lang#111073 by checking if `-Zexport-executable-symbols` is passed when LeakSanitizer is enabled.
Fix rust-lang#111073 by checking if `-Zexport-executable-symbols` is passed when LeakSanitizer is enabled.
Should be fixed by llvm/llvm-project#106912. |
Running with LeakSanitizer enabled is a mess: we are seeing spurious failures in CI on completely unrelated changes to the symbolize_process_symbolic_paths test. Attempting to reproduce them locally is denied with line noise such as: > LeakSanitizer: CHECK failed: lsan_interceptors.cpp:82 "((!lsan_init_is_running)) != (0)" (0x0, 0x0) (tid=29001) This seems to be rust-lang/rust#111073. In any event, AddressSanitizer comes with leak detection support and so let's just use that instead -- it hasn't caused any problems and we haven't seen any issues using it locally either. Signed-off-by: Daniel Müller <[email protected]>
Running with LeakSanitizer enabled is a mess: we are seeing spurious failures in CI on completely unrelated changes to the symbolize_process_symbolic_paths test. Attempting to reproduce them locally is denied with line noise such as: > LeakSanitizer: CHECK failed: lsan_interceptors.cpp:82 "((!lsan_init_is_running)) != (0)" (0x0, 0x0) (tid=29001) This seems to be rust-lang/rust#111073. In any event, AddressSanitizer comes with leak detection support and so let's just use that instead -- it hasn't caused any problems and we haven't seen any issues using it locally either. Signed-off-by: Daniel Müller <[email protected]>
Leak sanitizer infrastructure in Rust is badly broken [0]. Disable it until it resembles something of a working piece of software again. [0] rust-lang/rust#111073 Signed-off-by: Daniel Müller <[email protected]>
Leak sanitizer infrastructure in Rust is badly broken [0]. Disable it until it resembles something of a working piece of software again. [0] rust-lang/rust#111073 Signed-off-by: Daniel Müller <[email protected]>
Leak sanitizer infrastructure in Rust is badly broken [0]. Disable it until it resembles something of a working piece of software again. [0] rust-lang/rust#111073 Signed-off-by: Daniel Müller <[email protected]>
Leak sanitizer infrastructure in Rust is badly broken [0]. Disable it until it resembles something of a working piece of software again. [0] rust-lang/rust#111073 Signed-off-by: Daniel Müller <[email protected]>
Leak sanitizer infrastructure in Rust is badly broken [0]. Disable it until it resembles something of a working piece of software again. [0] rust-lang/rust#111073 Signed-off-by: Daniel Müller <[email protected]>
It's broken, see rust-lang/rust#111073.
It's broken, see rust-lang/rust#111073.
It's broken, see rust-lang/rust#111073.
It's broken, see rust-lang/rust#111073.
It's broken, see rust-lang/rust#111073.
LeakSanitizer started failing across all of my repositories starting with nightly runs on ~December 16 2024 with this error:
The first failure is on this nightly: $ rustc +nightly -Vv
rustc 1.85.0-nightly (c26db435b 2024-12-15)
binary: rustc
commit-hash: c26db435bf8aee2efc397aab50f3a21eb351d6e5
commit-date: 2024-12-15
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.5 $ cargo +nightly version --verbose
cargo 1.85.0-nightly (769f622e1 2024-12-14)
release: 1.85.0-nightly
commit-hash: 769f622e12db0001431d8ae36d1093fb8727c5d9
commit-date: 2024-12-14
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Ubuntu 24.4.0 (noble) [64-bit] This coincides with my repositories being upgraded to |
+1 Seeing same issue in https://github.com/fzyzcjy/flutter_rust_bridge recently, is there any updates? Thanks! |
This might be waiting on llvm 19.x series backport llvm/llvm-project#121100? |
The PR is #135484. |
Chromium bug discussion here: https://bugs.chromium.org/p/chromium/issues/detail?id=1441181#c5
We want to build rustc with
sanitizers = true
in config.toml in order to get sanitizer runtimes. However when we do, the leak.rs test fails with a CHECK failure in LLVM.Which is failing a check inside the
ENSURE_LSAN_INITED
macro here: https://github.com/llvm/llvm-project/blob/89a44b0faee0ca6b741e1f0ef31163374887b6ed/compiler-rt/lib/lsan/lsan_interceptors.cpp#L82We're building against LLVM HEAD-ish, so I tried with upstream rustc and the test fails when compiled with that as well (reduced command line from the actual test invocation):
The text was updated successfully, but these errors were encountered: