-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 <deso@posteo.net>
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 <deso@posteo.net>
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 <deso@posteo.net>
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 <deso@posteo.net>
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 <deso@posteo.net>
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 <deso@posteo.net>
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 <deso@posteo.net>
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: