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/asm: nil deref (4) #12627

Closed
dvyukov opened this issue Sep 15, 2015 · 4 comments
Closed

cmd/asm: nil deref (4) #12627

dvyukov opened this issue Sep 15, 2015 · 4 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 15, 2015

cmd/asm crashes on the following program:

FUNCDATA(SB),0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4b05b1]

goroutine 1 [running]:
cmd/internal/obj.Mconv(0xc82007d830, 0x0, 0x0)
    src/cmd/internal/obj/util.go:460 +0x661
cmd/internal/obj.Dconv(0x70fce0, 0xc82007d830, 0x0, 0x0)
    src/cmd/internal/obj/util.go:384 +0xc0c
cmd/asm/internal/asm.(*Parser).validImmediate(0xc82007de70, 0x60e590, 0x8, 0xc82007d830, 0x7)
    src/cmd/asm/internal/asm/asm.go:92 +0x8f
cmd/asm/internal/asm.(*Parser).asmFuncData(0xc82007de70, 0xc8200102d0, 0x8, 0xc82007db28, 0x2, 0x3)
    src/cmd/asm/internal/asm/asm.go:320 +0xe7
cmd/asm/internal/asm.(*Parser).pseudo(0xc82007de70, 0x7, 0xc8200102d0, 0x8, 0xc82007db28, 0x2, 0x3)
    src/cmd/asm/internal/asm/parse.go:225 +0xae
cmd/asm/internal/asm.(*Parser).line(0xc82007de70, 0xc82000a3a0)
    src/cmd/asm/internal/asm/parse.go:185 +0x990
cmd/asm/internal/asm.(*Parser).Parse(0xc82007de70, 0xc82000a3a0, 0xc8200182a0)
    src/cmd/asm/internal/asm/parse.go:85 +0x21
main.main()
    src/cmd/asm/main.go:59 +0xb85

go version devel +a1aafdb Tue Sep 15 16:12:59 2015 +0000 linux/amd64

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Sep 15, 2015
@gopherbot
Copy link

CL https://golang.org/cl/14595 mentions this issue.

@dvyukov
Copy link
Member Author

dvyukov commented Sep 16, 2015

cmd/asm survived whole minute of feeding with modem noise for the first time! :)

@robpike
Copy link
Contributor

robpike commented Sep 17, 2015

This is the one I should have fixed the first time. I was protecting obj instead of fixing it.

@dvyukov
Copy link
Member Author

dvyukov commented Sep 17, 2015

OK, 1093 unique crashes after the night. Let's see. :)

@golang golang locked and limited conversation to collaborators Sep 22, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants