tsan: false positives due to pthread_setcancelstate
Open
- Dominant language
- C
- Stars
- 12.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Describing it here so it is searchable.
If a thread is cancelled in the sleep below:
```
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE);
sleep(1);
```
then pthread will call pthread_cleanup_push cleanup functions from within the sleep. But sleep interceptor disables nested interceptors for obscure reasons. As the result tsan won't see any synchronization events from the cleanup functions. This can lead to false positives.
Contributor guide
Assessment
This issue has not been assessed yet.