-
Notifications
You must be signed in to change notification settings - Fork 96
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
Upgrade tooclhain to 2024-02-17 #3032
Conversation
This program is sufficient to reproduce the crash in the std lib regression: use std::sync;
#[cfg_attr(kani, kani::proof)]
fn main() {
let lock = sync::RwLock::new(5);
let c = lock.read();
let i = c.unwrap_or_else(|_| lock.read().unwrap());
assert!(*i == 5)
}
|
The test associated with #87 no longer fails (neither the original nor the simplified one). I'm not sure what changed upstream that caused it be fixed TBH.
Added. Thanks! |
The likely culprit for the crash in the std lib regression is rust-lang/rust#100603. |
A smaller program that produces the same crash: use std::sync::PoisonError;
#[cfg_attr(kani, kani::proof)]
fn main() {
let lr = std::sync::LockResult::<i32>::Ok(5);
let my_clos = |_x: PoisonError<_>| 5;
let _i = lr.unwrap_or_else(my_clos);
} The MIR for this program is 95 lines long (vs. 50K for the above one), so should be easier to debug. |
Here's a program that doesn't use #![feature(never_type)]
pub struct Foo {
_x: i32,
_never: !,
}
#[cfg_attr(kani, kani::proof)]
fn main() {
let res = Result::<i32, Foo>::Ok(3);
let _x = res.unwrap_or_else(|_f| 5);
}
|
I filed the crash as #3034. This is a blocker for the toolchain upgrade. |
1024a7b
to
70e6165
Compare
I ended up creating a new PR with the fix: #3040 |
Upgrade toolchain to 2024-02-17. Relevant PR:
rust-lang/rust#120500
Resolves #87
This currently breaks the
std
lib regression. Keeping it as a draft till we figure out a fix.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.