- Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-atomicArea: Atomics, barriers, and sync primitivesArea: Atomics, barriers, and sync primitivesC-bugCategory: This is a bug.Category: This is a bug.O-MIPSTarget: MIPS processorsTarget: MIPS processorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Hello,
nightly-2024-04-08 regressed on the following tests on MIPS:
failures: library/core/src/sync/atomic.rs - sync::atomic::AtomicI16::fetch_max (line 3072) library/core/src/sync/atomic.rs - sync::atomic::AtomicI16::fetch_min (line 3072) library/core/src/sync/atomic.rs - sync::atomic::AtomicI16::fetch_min (line 3084) library/core/src/sync/atomic.rs - sync::atomic::AtomicI8::fetch_max (line 3036) library/core/src/sync/atomic.rs - sync::atomic::AtomicI8::fetch_min (line 3036) library/core/src/sync/atomic.rs - sync::atomic::AtomicI8::fetch_min (line 3048) test result: FAILED. 4537 passed; 6 failed; 37 ignored; 0 measured; 6 filtered out; finished in 315.73s I have bisected this to #123555 in the Rust repo and to llvm/llvm-project@fbb27d1 in the LLVM repo.
How to reproduce
- (On Debian 12) install a MIPS toolchain:
sudo apt install \ gcc-mipsel-linux-gnu \ libc6-mipsel-cross \ qemu-user- Create a file
main.rswith the following contents (which is a simplified snippet of the failing doctests mentioned above):
fn main() { let x = std::sync::atomic::AtomicI8::new(23); assert_eq!(x.fetch_max(42, std::sync::atomic::Ordering::SeqCst), 23); }- Build it like this:
./x build --target mipsel-unknown-linux-gnu build/x86_64-unknown-linux-gnu/stage1/bin/rustc \ --target mipsel-unknown-linux-gnu \ -Clinker=mipsel-linux-gnu-gcc \ main.rs- Run like this:
qemu-mipsel -L /usr/mipsel-linux-gnu main Expected
The program completes successfully.
Actual
The program fails like this:
thread 'main' panicked at src/main.rs:3:5: assertion `left == right` failed left: 0 right: 23 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Bisection
With src/llvm-project pointing to llvm/llvm-project@fbb27d1 the test also fails, but when pointing src/llvm-project to the parent commit (llvm/llvm-project@e74c167) the test passes.
So we can conclude that this regression was introduced by llvm/llvm-project@fbb27d1, which originates from llvm/llvm-project#77072.
Edit: See llvm/llvm-project#77072 for more discussion around this.
@rustbot label +O-MIPS +A-atomic +T-compiler +C-bug
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-atomicArea: Atomics, barriers, and sync primitivesArea: Atomics, barriers, and sync primitivesC-bugCategory: This is a bug.Category: This is a bug.O-MIPSTarget: MIPS processorsTarget: MIPS processorsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.