Commit a2a8bc7
committed
newlib: Unlock the mutex while calling atexit()'ed functions
The atexit()'ed function may deadlock if it waits for another thread
which calls atexit() in the current __call_atexit.c code. This patch
unlock __atexit_recursive_mutex while calling atexit()'ed functions
to avoid the deadlock mentioned above. glibc and Darwin do the same,
so it sounds reasonable.
Addresses: https://cygwin.com/pipermail/cygwin/2025-October/258930.html
Reported-by: Tomohiro Kashiwada <[email protected]>
Reviewed-by: Corinna Vinschen <[email protected]>
Signed-off-by: Takashi Yano <[email protected]>1 parent d77cb8e commit a2a8bc7
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| |||
0 commit comments