Commit 75fa43e
authored
[Concurrency] Clear current task TSD before enqueuing task in swift_task_switch. (swiftlang#74736)
The executor may execute and free the task while the enqueue code is still finishing up. If that code tries to get an async backtrace (for example, if it calls malloc/free with malloc stack logging enabled) then it will find a dangling pointer in the current task TSD, and dereferencing it may crash.
rdar://1301250171 parent c19c73d commit 75fa43e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2199 | 2199 | | |
2200 | 2200 | | |
2201 | 2201 | | |
2202 | | - | |
2203 | 2202 | | |
| 2203 | + | |
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
| |||
0 commit comments