]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: add explicit `INT $3` at end of Darwin amd64 sigtramp
authorIan Lance Taylor <iant@golang.org>
Wed, 20 Jul 2016 22:40:10 +0000 (15:40 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 21 Jul 2016 01:04:22 +0000 (01:04 +0000)
The omission of this instruction could confuse the traceback code if a
SIGPROF occurred during a signal handler.  The traceback code would
trace up to sigtramp, but would then get confused because it would see a
PC address that did not appear to be in the function.

Fixes #16453.

Change-Id: I2b3d53e0b272fb01d9c2cb8add22bad879d3eebc
Reviewed-on: https://go-review.googlesource.com/25104
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/runtime/sys_darwin_amd64.s

index e09b906ba571f227308773ac40c87e6e0ec603f7..e4837ce2915ba126c19f2ef9234bb339f70a49c3 100644 (file)
@@ -244,6 +244,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$32
        MOVQ R8, 24(SP) // ctx
        MOVQ $runtime·sigtrampgo(SB), AX
        CALL AX
+       INT $3 // not reached (see issue 16453)
 
 TEXT runtime·mmap(SB),NOSPLIT,$0
        MOVQ    addr+0(FP), DI          // arg 1 addr