-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
A-shimsArea: This affects the external function shimsArea: This affects the external function shimsC-bugCategory: This is a bug.Category: This is a bug.
Description
libstd sets some flags on its pthreads locks that make pthreads check for reentrancy. Our shims for lock acquire/release don't do that though -- so code that should deadlock actually continues to run in Miri.
The following code demonstrates the issue:
use std::sync::Mutex;
fn main() {
let m = Mutex::new(0);
let _g1 = m.lock();
let _g2 = m.lock();
unreachable!();
}
Metadata
Metadata
Assignees
Labels
A-shimsArea: This affects the external function shimsArea: This affects the external function shimsC-bugCategory: This is a bug.Category: This is a bug.