• Martin Storsjo's avatar
    ntdll: Fix unwinding functions that end with a branch instruction. · babbf352
    Martin Storsjo authored
    This happens with functions that aren't intended to return e.g. like
    _Unwind_Resume. In these cases, the return address is outside of the
    function (the first instruction in the next function).
    
    Set the flag CONTEXT_UNWOUND_TO_CALL after unwinding to a callsite,
    and if this flag is set, look up a RUNTIME_FUNCTION based on
    Control.Pc - 4.
    
    This isn't a complete (nor probably entirely correct) implementation
    of the flag CONTEXT_UNWOUND_TO_CALL, but it practically seems to
    work fine and fixes a large number of unwinding cases.
    Signed-off-by: 's avatarMartin Storsjo <martin@martin.st>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    babbf352
signal_arm64.c 76.9 KB