Skip to content
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

Android: implement support for pthread synchronization primitives #3617

Closed
RalfJung opened this issue May 19, 2024 · 1 comment · Fixed by #3889
Closed

Android: implement support for pthread synchronization primitives #3617

RalfJung opened this issue May 19, 2024 · 1 comment · Fixed by #3889
Labels
A-concurrency Area: affects our concurrency (multi-thread) support A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available

Comments

@RalfJung
Copy link
Member

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.

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-shims Area: This affects the external function shims E-good-first-issue A good way to start contributing, mentoring is available A-concurrency Area: affects our concurrency (multi-thread) support labels May 19, 2024
@RalfJung
Copy link
Member Author

FWIW for 32bit android this is more tricky since pthread_mutex_t is too small for the hacks we currently use -- that would need #3749 before we can have proper support.

But so far we anyway only test 64bit Android on CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: affects our concurrency (multi-thread) support A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant