Running sanitizer tests fails with mixed ABI errors
Open
Nobody has claimed this yet.
A-ABI
A-diagnostics
C-bug
F-target_modifiers
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
RUSTFLAGS="-Z sanitizer=address -Cunsafe-allow-abi-mismatch=sanitizer" cargo +nightly -Z build-std test --target x86_64-unknown-linux-gnu --all-features
I expected to see this happen: tests pass/fail
Instead, this happened:
error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `hashlink`
|
= 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=memory` in dependency `core`
= help: set `-Zsanitizer=memory` in this crate or unset `-Zsanitizer` in `core`
= help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=sanitizer` to silence this error
Note that I already added the suppression option, but it doesn't seem to take effect here?
Meta
rustc --version --verbose:
rustc 1.92.0-nightly (839222065 2025-10-05)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the reported rustc 1.92.0-nightly version and the exact cargo command, then compare the sanitizer ABI diagnostic with the supplied suppression flag. Use the linked CircleCI job to confirm the behavior; done means the intended sanitizer test run no longer rejects the suppression option unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100