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

cmd/link: panic in (*deadcodepass).flood #33775

bcmills opened this issue Aug 22, 2019 · 1 comment


Copy link

commented Aug 22, 2019

Observed on the darwin-386-10_14 builder (

# fmt.test
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x5d pc=0x13b4e4]

goroutine 1 [running]:
	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/link/internal/ld/deadcode.go:352 +0x414
	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/link/internal/ld/deadcode.go:61 +0x92
cmd/link/internal/ld.Main(0x3d0380, 0x10, 0x20, 0x1, 0x4, 0x8, 0x236bde, 0x12, 0x239da0, 0x18, ...)
	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/link/internal/ld/main.go:211 +0x9a2
	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/link/main.go:65 +0x161
FAIL	fmt [build failed]

See previously #17140, #16887.

CC @cherrymui @mdempsky @ianlancetaylor

@bcmills bcmills added this to the Go1.14 milestone Aug 22, 2019


This comment has been minimized.

Copy link

commented Sep 9, 2019

Thank you for the report Bryan!

Empirically that code doesn't make sense unless there perhaps was a data race or just data corruption that made s.FuncInfo nil, because the line it is failing on, given commit e764432 as per the logs, the line is

for i := range s.FuncInfo.Funcdata {

and right before it, we explicitly checked that s.FuncInfo != nil as per

if s.FuncInfo != nil {
for i := range s.FuncInfo.Funcdata {
d.mark(s.FuncInfo.Funcdata[i], s)

And that code seems to be invoked sequentially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.