NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-arm/59351: compat_setjmp is busted



The following reply was made to PR port-arm/59351; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-arm/59351: compat_setjmp is busted
Date: Mon, 28 Apr 2025 03:05:46 +0300

 I think this should fix it (also fixes the incorrect comment about
 sigblock).
 
 Index: lib/libc/compat/arch/arm/gen/compat_setjmp.S
 ===================================================================
 RCS file: /cvsroot/src/lib/libc/compat/arch/arm/gen/compat_setjmp.S,v
 retrieving revision 1.5
 diff -u -p -r1.5 compat_setjmp.S
 --- lib/libc/compat/arch/arm/gen/compat_setjmp.S	5 Dec 2020 11:18:21 -0000	1.5
 +++ lib/libc/compat/arch/arm/gen/compat_setjmp.S	28 Apr 2025 00:06:08 -0000
 @@ -46,12 +46,13 @@
   */
  
  ENTRY(setjmp)
 -	/* Block all signals and retrieve the old signal mask */
 +	/* Retrieve the old signal mask */
  	push	{r0, lr}
  	movs	r0, #0x00000000
  
  	bl	PLT_SYM(_C_LABEL(sigblock))
  	mov	r1, r0
 +	pop	{r0, lr}
  
  	/* Store signal mask */
  	str	r1, [r0, #(_JB_SIGMASK * 4)]
 @@ -83,7 +84,7 @@ ENTRY(setjmp)
  	stmia	r0, {r4-lr}
  #endif
  	movs	r0, #0
 -	pop	{r3, pc}
 +	RET
  END(setjmp)
  
  ENTRY(longjmp)
 
 -uwe
 


Home | Main Index | Thread Index | Old Index