Proper support for mutex type `PTHREAD_MUTEX_ERRORCHECK` checking return types
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 252
- Forks
- 90
- Avg merge
- 4d 1m
- Merged PRs (30d)
- 19
Description
With the revival of deadlock analysis (#655), it becomes more and more important that we handle behavior specific to mutex types.
Via pthread_mutexattr_settype there are the following possibilities:
-
PTHREAD_MUTEX_DEFAULT– misuse is undefined behavior -
PTHREAD_MUTEX_NORMAL– relocking deadlocks, other misuse is undefined behavior -
PTHREAD_MUTEX_ERRORCHECK– misuse returns errors -
PTHREAD_MUTEX_RECURSIVE– relocking allowed, other misuse returns errors
Additionally:
- We don't do anything smart with read-write locks (
pthread_rwlock_rdlock,pthread_rwlock_wrlock). (#661) - Since some of the types are about differences in return values, we should also consider those, instead of completely ignoring them.
The different mutex types affect multiple features:
- Race detection
- Deadlock detection
- Base and Apron privatization
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pthread_mutexattr_settype and the deadlock-analysis work referenced in #655; map how PTHREAD_MUTEX_ERRORCHECK affects race detection, deadlock detection, and Base and Apron privatization. Done means error-return behavior is handled for this mutex type across those listed features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ocaml
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100