Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: fatal error: unknown caller pc #43942

Open
mdempsky opened this issue Jan 27, 2021 · 0 comments
Open

runtime: fatal error: unknown caller pc #43942

mdempsky opened this issue Jan 27, 2021 · 0 comments
Labels

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jan 27, 2021

This program should run successfully: https://play.golang.org/p/LQbgPxRijfF

But currently it fails when run with cmd/compile with output:

Full runtime output
runtime: unexpected return pc for main.main.func2.1 called from 0xc00005c0a0
stack: frame={sp:0xc000066ed0, fp:0xc000066ef0} stack=[0xc000066000,0xc000067000)
000000c000066dd0:  00000000004b27a0  000000000055fac8 
000000c000066de0:  000000c000066f00  0000000000000000 
000000c000066df0:  0000000000000000  0000000000000000 
000000c000066e00:  000000c000066e40  00000000004a6fe5 <main.main.func3.1+133> 
000000c000066e10:  00000000004b27a0  000000000055fac8 
000000c000066e20:  0000000000000000  00000000004d4580 
000000c000066e30:  00000000004b27a0  000000000055fac8 
000000c000066e40:  000000c000066e70  000000000046203e <runtime.call32+62> 
000000c000066e50:  00000000004a7075 <main.main.func3+85>  000000c000066f48 
000000c000066e60:  000000c000000180  0000000000000000 
000000c000066e70:  000000c000066f38  000000000043233a <runtime.gopanic+1146> 
000000c000066e80:  0000000000000000  00000000004d4358 
000000c000066e90:  0000000000000000  0000000000000000 
000000c000066ea0:  00000000004ea968  00000000004b8a01 
000000c000066eb0:  00000000004d4340  00000000004d4338 
000000c000066ec0:  000000c00005c0a0  00000000004a6e05 <main.main.func2.1+69> 
000000c000066ed0: <000000c000000180  00000000004d4348 
000000c000066ee0:  000000c00005c0c0 !000000c00005c0a0 
000000c000066ef0: >000000c0000001a8  000000c0000001a0 
000000c000066f00:  000000c000066e50  00000000004b27a0 
000000c000066f10:  00000000004ea970  0000000000000000 
000000c000066f20:  0000000000000000  0000000000000000 
000000c000066f30:  0000000000000100  000000c000066f58 
000000c000066f40:  00000000004a7075 <main.main.func3+85>  00000000004b27a0 
000000c000066f50:  00000000004ea970  000000c000066f78 
000000c000066f60:  00000000004a694a <main.main+74>  01000000004b2260 
000000c000066f70:  00000000004d4328  000000c000066fd0 
000000c000066f80:  0000000000435029 <runtime.main+521>  000000c00005e000 
000000c000066f90:  0000000000000000  000000c00005e000 
000000c000066fa0:  0000000000000000  0100000000000000 
000000c000066fb0:  0000000000000000  000000c000000180 
000000c000066fc0:  000000c000066fae  00000000004d45c0 
000000c000066fd0:  0000000000000000  00000000004638c1 <runtime.goexit+1> 
000000c000066fe0:  0000000000000000  0000000000000000 
fatal error: unknown caller pc

runtime stack:
runtime.throw(0x4ce407, 0x11)
	/usr/local/go-faketime/src/runtime/panic.go:1116 +0x72
runtime.gentraceback(0x4a6e05, 0xc000066ed0, 0x0, 0xc000000180, 0x0, 0x0, 0x7fffffff, 0x7f1916469db8, 0x0, 0x0, ...)
	/usr/local/go-faketime/src/runtime/traceback.go:273 +0x1aec
runtime.addOneOpenDeferFrame.func1()
	/usr/local/go-faketime/src/runtime/panic.go:721 +0x91
runtime.systemstack(0x461b54)
	/usr/local/go-faketime/src/runtime/asm_amd64.s:370 +0x66
runtime.mstart()
	/usr/local/go-faketime/src/runtime/proc.go:1116

goroutine 1 [running]:
runtime.systemstack_switch()
	/usr/local/go-faketime/src/runtime/asm_amd64.s:330 fp=0xc000066d08 sp=0xc000066d00 pc=0x461c80
runtime.addOneOpenDeferFrame(0xc000000180, 0x0, 0x0)
	/usr/local/go-faketime/src/runtime/panic.go:720 +0x7b fp=0xc000066d48 sp=0xc000066d08 pc=0x4318db
panic(0x4b27a0, 0x55fac8)
	/usr/local/go-faketime/src/runtime/panic.go:971 +0x417 fp=0xc000066e10 sp=0xc000066d48 pc=0x4322d7
main.main.func3.1()
	/tmp/sandbox276749924/prog.go:31 +0x85 fp=0xc000066e50 sp=0xc000066e10 pc=0x4a6fe5
runtime.call32(0x0, 0x4d4358, 0x0, 0x0)
	/usr/local/go-faketime/src/runtime/asm_amd64.s:540 +0x3e fp=0xc000066e80 sp=0xc000066e50 pc=0x46203e
panic(0x4b27a0, 0x4ea970)
	/usr/local/go-faketime/src/runtime/panic.go:975 +0x47a fp=0xc000066f48 sp=0xc000066e80 pc=0x43233a
main.main.func3()
	/tmp/sandbox276749924/prog.go:34 +0x55 fp=0xc000066f68 sp=0xc000066f48 pc=0x4a7075
main.main()
	/tmp/sandbox276749924/prog.go:35 +0x4a fp=0xc000066f88 sp=0xc000066f68 pc=0x4a694a
runtime.main()
	/usr/local/go-faketime/src/runtime/proc.go:204 +0x209 fp=0xc000066fe0 sp=0xc000066f88 pc=0x435029
runtime.goexit()
	/usr/local/go-faketime/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000066fe8 sp=0xc000066fe0 pc=0x4638c1

It succeeds with gccgo and cmd/compile w/ -gcflags=-N. It also still fails at CL 286712, PS 3.

Sorry for another larger reproducer.

/cc @danscales @randall77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant