rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.66k stars 349 forks source link

ensure that a macOS os_unfair_lock that is moved while being held is not implicitly unlocked #3973

Closed RalfJung closed 1 month ago

RalfJung commented 1 month ago

Fixes https://github.com/rust-lang/miri/issues/3859

We mark an os_unfair_lock that is moved while being held as "poisoned", which means it is now considered forever locked. That's not quite what the real implementation does, but allowing arbitrary moves-while-locked would likely expose a ton of implementation details, so hopefully this is good enough.

RalfJung commented 1 month ago

@bors r+

bors commented 1 month ago

:pushpin: Commit 9a4cd35bf0befd2cad2259e9d6fcd99b2aa7e4e0 has been approved by RalfJung

It is now in the queue for this repository.

bors commented 1 month ago

:hourglass: Testing commit 9a4cd35bf0befd2cad2259e9d6fcd99b2aa7e4e0 with merge 23ff2ea062baa1d9293491015bd855c0c1e7d155...

bors commented 1 month ago

:sunny: Test successful - checks-actions Approved by: RalfJung Pushing 23ff2ea062baa1d9293491015bd855c0c1e7d155 to master...