-
-
Save nsrip-dd/d85ff0d05d2afa6ca0c12796e992ea91 to your computer and use it in GitHub Desktop.
runtime/trace frame pointer unwinding crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To reproduce this crash: | |
``` | |
go1.21.3 test -trace=/dev/null | |
``` | |
Example crash: | |
``` | |
SIGSEGV: segmentation violation | |
PC=0x694a4 m=0 sigcode=1 | |
goroutine 0 [idle]: | |
runtime.fpTracebackPCs(...) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/trace.go:1018 | |
runtime.traceStackID(0x167d80b0f5a7?, {0xffff6ff2c018, 0xfd62ea4?, 0x80}, 0xfffff8407848?) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/trace.go:991 +0x224 fp=0xfffff84077f0 sp=0xfffff84077a0 pc=0x694a4 | |
runtime.traceEventLocked(0xfffff8407898?, 0x502dc?, 0x23d500?, 0x400002b6d8, 0x12, 0x0, 0x1, {0x0, 0x0, 0xc9e3f?}) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/trace.go:834 +0x240 fp=0xfffff8407870 sp=0xfffff84077f0 pc=0x68b10 | |
runtime.traceEvent(0x0?, 0x1, {0x0, 0x0, 0x0}) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/trace.go:770 +0x90 fp=0xfffff84078e0 sp=0xfffff8407870 pc=0x68870 | |
runtime.traceGoPreempt(...) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/trace.go:1609 | |
runtime.gopreempt_m(0x105d292a?) | |
/home/ec2-user/sdk/go1.21.3/src/runtime/proc.go:3786 +0x50 fp=0xfffff8407920 sp=0xfffff84078e0 pc=0x505a0 | |
traceback: unexpected SPWRITE function runtime.mcall | |
runtime.mcall() | |
/home/ec2-user/sdk/go1.21.3/src/runtime/asm_arm64.s:192 +0x54 fp=0xfffff8407930 sp=0xfffff8407920 pc=0x773e4 | |
goroutine 19 [running]: | |
runtime.asyncPreempt2() | |
/home/ec2-user/sdk/go1.21.3/src/runtime/preempt.go:307 +0x3c fp=0x4000097d40 sp=0x4000097d20 pc=0x4763c | |
runtime.asyncPreempt() | |
/home/ec2-user/sdk/go1.21.3/src/runtime/preempt_arm64.s:47 +0x9c fp=0x4000097f30 sp=0x4000097d40 pc=0x7a42c | |
fpcrash.MakeBigStruct() | |
/home/ec2-user/fpcrash/main_test.go:13 +0x2c fp=0x4000097f40 sp=0x4000097f40 pc=0x1009dc | |
fpcrash.TestCrash(0x0?) | |
/home/ec2-user/fpcrash/main_test.go:23 +0x20 fp=0x4000097f60 sp=0x4000097f40 pc=0x100a10 | |
testing.tRunner(0x4000082b60, 0x14f600) | |
/home/ec2-user/sdk/go1.21.3/src/testing/testing.go:1595 +0xe8 fp=0x4000097fb0 sp=0x4000097f60 pc=0xca098 | |
testing.(*T).Run.func1() | |
/home/ec2-user/sdk/go1.21.3/src/testing/testing.go:1648 +0x2c fp=0x4000097fd0 sp=0x4000097fb0 pc=0xcaeac | |
runtime.goexit() | |
/home/ec2-user/sdk/go1.21.3/src/runtime/asm_arm64.s:1197 +0x4 fp=0x4000097fd0 sp=0x4000097fd0 pc=0x79894 | |
created by testing.(*T).Run in goroutine 1 | |
/home/ec2-user/sdk/go1.21.3/src/testing/testing.go:1648 +0x33c | |
[ ... other stacks omitted ... ] | |
r0 0x3 | |
r1 0xffff6ff2c018 | |
r2 0x80 | |
r3 0x80 | |
r4 0xc090c80000000000 | |
r5 0x4000082d00 | |
r6 0xffff6ff2c028 | |
r7 0x7e | |
r8 0xc090c80000000000 | |
r9 0x29a | |
r10 0xfbe8 | |
r11 0xffffffffffffffda | |
r12 0x179dd5bd931e | |
r13 0x7fffffff | |
r14 0x14f600 | |
r15 0xffffffffffffffff | |
r16 0xfffff83f7d10 | |
r17 0x4000097c10 | |
r18 0x0 | |
r19 0x0 | |
r20 0xfffff84077c0 | |
r21 0x23d500 | |
r22 0x4000004000 | |
r23 0x0 | |
r24 0x0 | |
r25 0x0 | |
r26 0x14f868 | |
r27 0x271000 | |
r28 0x23ce60 | |
r29 0xfffff8407798 | |
lr 0x68b10 | |
sp 0xfffff84077a0 | |
pc 0x694a4 | |
fault 0xc090c80000000008 | |
exit status 2 | |
FAIL fpcrash 1.467s | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define JUNK -1.0740e+03 | |
TEXT ·fillregs(SB),$0-0 | |
FMOVD $JUNK, F0 | |
FMOVD $JUNK, F1 | |
FMOVD $JUNK, F2 | |
FMOVD $JUNK, F3 | |
FMOVD $JUNK, F4 | |
FMOVD $JUNK, F5 | |
FMOVD $JUNK, F6 | |
FMOVD $JUNK, F7 | |
FMOVD $JUNK, F8 | |
FMOVD $JUNK, F9 | |
FMOVD $JUNK, F10 | |
FMOVD $JUNK, F11 | |
FMOVD $JUNK, F12 | |
FMOVD $JUNK, F13 | |
FMOVD $JUNK, F14 | |
FMOVD $JUNK, F15 | |
FMOVD $JUNK, F16 | |
FMOVD $JUNK, F17 | |
FMOVD $JUNK, F18 | |
FMOVD $JUNK, F19 | |
FMOVD $JUNK, F20 | |
FMOVD $JUNK, F21 | |
FMOVD $JUNK, F22 | |
FMOVD $JUNK, F23 | |
FMOVD $JUNK, F24 | |
FMOVD $JUNK, F25 | |
FMOVD $JUNK, F26 | |
FMOVD $JUNK, F27 | |
FMOVD $JUNK, F28 | |
FMOVD $JUNK, F29 | |
FMOVD $JUNK, F30 | |
FMOVD $JUNK, F31 | |
RET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "testing" | |
type BigStruct struct { | |
a bool | |
b, c uint8 | |
d, e uint32 | |
} | |
//go:noinline | |
func MakeBigStruct() BigStruct { | |
return BigStruct{} | |
} | |
var sink BigStruct | |
func fillregs() | |
func TestCrash(t *testing.T) { | |
for { | |
fillregs() | |
sink = MakeBigStruct() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment