Martin Storsjo : ntdll: Fix handling of the save_lrpair unwind opcode.

Alexandre Julliard julliard at winehq.org
Thu May 28 17:11:10 CDT 2020


Module: wine
Branch: master
Commit: 8477f61b9fc25e99cdf942ba745d08efd41d6c22
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8477f61b9fc25e99cdf942ba745d08efd41d6c22

Author: Martin Storsjo <martin at martin.st>
Date:   Thu May 28 11:14:38 2020 +0300

ntdll: Fix handling of the save_lrpair unwind opcode.

The register offset should be multiplied by 2, and the second
register is always Lr.

Signed-off-by: Martin Storsjo <martin at martin.st>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/signal_arm64.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 4c5944759f..7a3625b706 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -1467,7 +1467,10 @@ static void process_unwind_codes( BYTE *ptr, BYTE *end, CONTEXT *context,
         else if (*ptr < 0xd6)  /* save_reg_x */
             restore_regs( 19 + ((val >> 5) & 0xf), 1, -(val & 0x1f) - 1, context, ptrs );
         else if (*ptr < 0xd8)  /* save_lrpair */
-            restore_regs( 19 + ((val >> 6) & 0x7), 2, val & 0x3f, context, ptrs );
+        {
+            restore_regs( 19 + 2 * ((val >> 6) & 0x7), 1, val & 0x3f, context, ptrs );
+            restore_regs( 30, 1, (val & 0x3f) + 1, context, ptrs );
+        }
         else if (*ptr < 0xda)  /* save_fregp */
             restore_fpregs( 8 + ((val >> 6) & 0x7), save_next, val & 0x3f, context, ptrs );
         else if (*ptr < 0xdc)  /* save_fregp_x */




More information about the wine-cvs mailing list