-
Notifications
You must be signed in to change notification settings - Fork 390
Labels
A-concurrencyArea: affects our concurrency (multi-thread) supportArea: affects our concurrency (multi-thread) supportA-shimsArea: This affects the external function shimsArea: This affects the external function shimsC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-second-issueA good issue to pick up if you've already seen some parts of Miri, mentoring is availableA good issue to pick up if you've already seen some parts of Miri, mentoring is available
Description
pthread's synchronization primitives must not be moved to a different location once they were initialized. However, Miri does currently not catch that kind of UB. We probably want a fundamentally different implementation of these primitives to detect such bugs -- instead of storing data in the memory that is occupied by pthread_mutex_t
et al, we use the address of the pthread_mutex_t
as the key into some table for managing the lock.
This would also avoid having to figure out which "offsets" inside pthread_mutex_t
to use on which OS to do what... we'd entirely stop caring about the layout of pthread_mutex_t
. So this is a better way to achieve FreeBSD support for the pthread primitives as well.
- mutex
- rwlock
- condvar
Metadata
Metadata
Assignees
Labels
A-concurrencyArea: affects our concurrency (multi-thread) supportArea: affects our concurrency (multi-thread) supportA-shimsArea: This affects the external function shimsArea: This affects the external function shimsC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-second-issueA good issue to pick up if you've already seen some parts of Miri, mentoring is availableA good issue to pick up if you've already seen some parts of Miri, mentoring is available