-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Regression: Miscompilation due to bug in "mutable noalias" logic #84958
Copy link
Copy link
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-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
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-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The ring test suite started failing when I tried to upgrade to untrusted 0.8.0. The regression first shipped in nightly-2021-03-23:
We were further able to narrow down the regression by bisecting down to: 97663b6 "Auto merge of #82834 - nikic:mutable-noalias, r=nagisa Enable mutable noalias for LLVM >= 12."
The symptoms are 100% consistent with lifetimes being an input into the problem. The regression occurs in
--releasemode.Code
I tried this code:
Cargo.toml:
src/lib.rs:
I expected to see this happen: explanation
cargo +nightly test --releaseshould pass.Instead, this happened: explanation
cargo +nightly test --releasefails with:Version it worked on
Stable
Beta
nightly-2021-03-22
Version with regression
cargo +nightly-2021-03-23 version --verbose@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged