0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
zml/async/coro_base.zig
Corentin Kerisit 00ebef1a32
async/coro: make coroutines unwindable (#273)
The first stack of each new coroutines were holding not zeroed and hold
random memory data, which get popped in rbp during first coroutine stack
swap.

Which made unwinding random or even SIGSEGV when _Unwind_Backtrace was
used (during C++ exception for instance).

Zeroing the first part of the stack makes unwinding stop gracefully when
it encounters $rbp=0x00.
2025-07-12 20:48:37 +02:00

78 lines
2.3 KiB