You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: mixing -Zsanitizer will cause an ABI mismatch - when running doctests #146465
export RUSTFLAGS="-Zsanitizer=thread"export RUSTDOCFLAGS="-Zsanitizer=thread"
cargo +nightly test --release -Zbuild-std --target=x86_64-unknown-linux-gnu
I expected to see this happen: tests should run with thread sanitizer enabled.
Instead, this happened: regular tests ran fine, but doc tests failed to compile with the following error. In particular, "help: set -Zsanitizer=thread in this crate" is strange given that I've set RUSTDOCFLAGS="-Zsanitizer=thread".
error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `paralight`
--> src/lib.rs:9:1
|
9 | #![doc = include_str!("../README.md")]
| ^
|
= help: the `-Zsanitizer` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
= note: unset `-Zsanitizer` in this crate is incompatible with `-Zsanitizer=thread` in dependency `std`
= help: set `-Zsanitizer=thread` in this crate or unset `-Zsanitizer` in `std`
= help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=sanitizer` to silence this error
I suspect this might be related to #138736 or more broadly the work tracked in #138453.
The CI for the crate triomphefails for this exact reason also. I've tested various versions and the one that introduces the failure is nightly 2025-09-06 (rustc 6c699a372). That version contains #138736.
$ git log --first-parent --oneline af00ff2ce..6c699a372
6c699a37235 Auto merge of #146255 - fmease:rollup-1v0kp8i, r=fmease
99317ef14d0 Auto merge of #146121 - Muscraft:filter-suggestion-parts, r=petrochenkov
9cd272dc853 Auto merge of #146044 - estebank:issue-88727, r=chenyukang
c559c4a7418 Auto merge of #146224 - tgross35:rollup-1bgjms3, r=tgross35
ad85bc524b1 Auto merge of #144737 - petrochenkov:extprelcache, r=davidtwco
91edc3ebccc Auto merge of #146218 - flip1995:clippy-subtree-update, r=Manishearth
b3cfb8faf84 Auto merge of #138736 - azhogin:azhogin/sanitizers-target-modificators, r=rcvalle
af00ff2ce is the commit hash of nightly 2025-09-05.
That PR (and the error) says that adding -Cunsafe-allow-abi-mismatch=sanitizer will fix the issue, but it feels like that shouldn't be necessary. Assuming that the issue is that the std lib is being built with -Zsanitizer=thread set and the doctests are being built with -Zsanitizer unset, shouldn't it be the case that the RUSTDOCFLAGS='-Zsanitizer=thread' env variables force the tests to be built with the sanitizer option set? If not, that feels like a bug.
Activity
iorizu commentedon Sep 12, 2025
The CI for the crate triomphe fails for this exact reason also. I've tested various versions and the one that introduces the failure is
nightly 2025-09-06 (rustc 6c699a372). That version contains #138736.af00ff2ceis the commit hash ofnightly 2025-09-05.That PR (and the error) says that adding
-Cunsafe-allow-abi-mismatch=sanitizerwill fix the issue, but it feels like that shouldn't be necessary. Assuming that the issue is that the std lib is being built with-Zsanitizer=threadset and the doctests are being built with-Zsanitizerunset, shouldn't it be the case that theRUSTDOCFLAGS='-Zsanitizer=thread'env variables force the tests to be built with the sanitizer option set? If not, that feels like a bug.Darksonn commentedon Sep 12, 2025
Similar to #144521. Probably has a similar to fix to #144523.
Darksonn commentedon Sep 12, 2025
cc @rcvalle @azhogin
Avoid running doc tests with sanitizer
Avoid running doc tests with sanitizer
Avoid running doc tests with sanitizer
Avoid running doc tests with sanitizer
25 remaining items
rust: kbuild: workaround `rustdoc` doctests modifier bug
Enable tests docs under sanitizer again
Enable tests docs under sanitizer again
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
rust: kbuild: workaround `rustdoc` doctests modifier bug
Fix sanitizer ABI mismatch error on Rust nightly
Fix sanitizer ABI mismatch error on Rust nightly
Fix sanitizer ABI mismatch error on Rust nightly
rust: Makefile: bound rustdoc workaround to affected versions