NetBSD-Bugs archive

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

PR/57946 CVS commit: src



The following reply was made to PR lib/57946; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57946 CVS commit: src
Date: Thu, 4 Apr 2024 00:46:30 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Apr  4 00:46:30 UTC 2024
 
 Modified Files:
 	src/lib/libc/arch/x86_64/gen: __setjmp14.S __sigsetjmp14.S
 	src/tests/lib/libc/setjmp: t_sigstack.c
 
 Log Message:
 amd64 longjmp: Restore stack first, then signal mask.
 
 Otherwise, a pending signal may be delivered on the wrong stack when
 we restore the signal mask.
 
 While here:
 
 - Tidy the code a little bit.
 - Sprinkle comments to explain what's going on.
 - Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'.
   => Same effect, one byte shorter, breaks dep chain on more uarches.
 - Use forward branches for statically predicted not-taken.
   => val==0 is unlikely in longjmp
 
 PR lib/57946
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/x86_64/gen/__setjmp14.S \
     src/lib/libc/arch/x86_64/gen/__sigsetjmp14.S
 cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/setjmp/t_sigstack.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index