matklad / once_cell

Rust library for single assignment cells and lazy statics without macros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parking_lot implementation tests fail under Miri due to compare_exchange_weak failures

saethlin opened this issue · comments

compare_exchange_weak is allowed to spuriously fail. By default, Miri makes most calls fail so this panics when running tests:

Err(_) => debug_assert!(false),

Looks like this code simply wants compare_exchange without the "weak", if it does not want to handle spurious failures?

Nah, that’s just a bug, it should have Err(INCOMPLETE) => (), branch

@RalfJung in case no-one has told you this yet, miri is very cool, thanks!