Skip to content

Commit ff227b8

Browse files
runtime: add explicit INT $3 at end of Darwin amd64 sigtramp
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 <[email protected]>
1 parent f407ca9 commit ff227b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/sys_darwin_amd64.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$32
244244
MOVQ R8, 24(SP) // ctx
245245
MOVQ $runtime·sigtrampgo(SB), AX
246246
CALL AX
247+
INT $3 // not reached (see issue 16453)
247248

248249
TEXT runtime·mmap(SB),NOSPLIT,$0
249250
MOVQ addr+0(FP), DI // arg 1 addr

0 commit comments

Comments
 (0)