rust-lang / miri

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

Android: implement support for pthread synchronization primitives #3617

Open RalfJung opened 1 month ago

RalfJung commented 1 month ago

We don't currently support the pthread shims on Android. This shouldn't be too hard: the shims are implemented in src/shims/unix/sync.rs, and all that needs to be done is figure out how big the pthread types are on Android and then picking suitable offsets for Miri to store its data in there.

The test command for this is ./miri --target aarch64-linux-android pthread-sync.