-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cygwin: pthread: Fix a race issue introduced by the commit 2c5433e
To avoid race issues, pthread::once() uses pthread_mutex. This caused the handle leak which was fixed by the commit 2c5433e. However, this fix introduced another race issue, i.e., the mutex may be used after it is destroyed. This patch fixes the issue. Special thanks to Bruno Haible for discussing how to fix this. Addresses: https://cygwin.com/pipermail/cygwin/2024-May/255987.html Reported-by: Bruno Haible <[email protected]> Fixes: 2c5433e ("Cygwin: pthread: Fix handle leak in pthread_once.") Reviewed-by: Ken Brown <[email protected]> Signed-off-by: Takashi Yano <[email protected]>
- Loading branch information
Showing
3 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters