"Oliver Kowalke" <oliver.kowalke@xxxxxx> writes: > What marks the end of stack or how does uw_frame_state_for() detect the end of stack? > I've a coroutine library and I'm using _Unwind_ForcedUnwind() for stack cleanup. Function _Unwind_ForcedUnwind_Phase2() never sets _URC_END_OF_STACK! What happens when it goes past the top of the stack? Normally the unwinder returns _URC_END_OF_STACK when it finds a stack frame with a PC value with no associated FDE. A specific such PC value is zero. In other words, if you set up your coroutine library so that if the top function in the coroutine returned, it would return to address 0, then the unwind code should reliably detect the top of the stack. Ian