Commit 64203d5
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 64203d5
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
0 commit comments