[hurd,commited,1/5] hurd: Fix unwinding over interruptible RPC

Message ID 20200608000633.3551460-2-samuel.thibault@ens-lyon.org
State New
Headers show
Series
  • Fix and enable more tests
Related show

Commit Message

Samuel Thibault June 8, 2020, 12:06 a.m.
* sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Set CFA register to
%ecx while %esp is altered.
---
 sysdeps/mach/hurd/i386/intr-msg.h | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.26.2

Patch

diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h
index 54420fed01..70e6cc6592 100644
--- a/sysdeps/mach/hurd/i386/intr-msg.h
+++ b/sysdeps/mach/hurd/i386/intr-msg.h
@@ -37,10 +37,12 @@ 
        "				movl %6, %%eax\n"		      \
        "				jmp _hurd_intr_rpc_msg_sp_restored\n" \
        "_hurd_intr_rpc_msg_do:		movl %%esp, %%ecx\n"		      \
+       "				.cfi_def_cfa_register %%ecx\n"	      \
        "				leal %4, %%esp\n"		      \
        "_hurd_intr_rpc_msg_cx_sp:	movl $-25, %%eax\n"		      \
        "_hurd_intr_rpc_msg_do_trap:	lcall $7, $0 # status in %0\n"	      \
        "_hurd_intr_rpc_msg_in_trap:	movl %%ecx, %%esp\n"		      \
+       "				.cfi_def_cfa_register %%esp\n"	      \
        "_hurd_intr_rpc_msg_sp_restored:"				      \
        : "=a" (err), "+m" (option), "+m" (timeout), "=m" (*intr_port_p)	      \
        : "m" ((&msg)[-1]), "m" (*cancel_p), "i" (EINTR)			      \