Commit 6d16dc4
committed
coroutine: exception: workaround broken destroy coroutine handle in await_suspend
gcc 15.2 and above crash if a coroutine handle is destroyed when
await_suspend for that coroutine is called [1]. An internal reference
counter is accessed after the coroutine is destroyed.
Work around this by scheduling the work to a task. This is slower,
but doesn't crash, and exceptions are supposed to be somewhat rare.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1219611 parent 99e07a1 commit 6d16dc4
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
0 commit comments