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 (2) #12468

Closed
dvyukov opened this issue Sep 3, 2015 · 1 comment
Closed

cmd/asm: nil deref (2) #12468

dvyukov opened this issue Sep 3, 2015 · 1 comment

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 3, 2015

cmd/asm crashes on the following input:

TEXT$:0:(SB
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4b0571]

goroutine 1 [running]:
cmd/internal/obj.Mconv(0xc82007d6b0, 0x0, 0x0)
    src/cmd/internal/obj/util.go:473 +0x661
cmd/internal/obj.Dconv(0x70ec40, 0xc82007d6b0, 0x0, 0x0)
    src/cmd/internal/obj/util.go:397 +0xc0c
cmd/asm/internal/asm.(*Parser).getConstantPseudo(0xc82007de70, 0x6095b8, 0x4, 0xc82007d6b0, 0x7)
    src/cmd/asm/internal/asm/asm.go:644 +0x93
cmd/asm/internal/asm.(*Parser).evalInteger(0xc82007de70, 0x6095b8, 0x4, 0xc82010c230, 0x2, 0x3, 0x0)
    src/cmd/asm/internal/asm/asm.go:79 +0x9e
cmd/asm/internal/asm.(*Parser).asmText(0xc82007de70, 0xc82010a0a0, 0x4, 0xc82007db28, 0x3, 0x3)
    src/cmd/asm/internal/asm/asm.go:112 +0x24c
cmd/asm/internal/asm.(*Parser).pseudo(0xc82007de70, 0xd, 0xc82010a0a0, 0x4, 0xc82007db28, 0x3, 0x3)
    src/cmd/asm/internal/asm/parse.go:217 +0x222
cmd/asm/internal/asm.(*Parser).line(0xc82007de70, 0xc820112060)
    src/cmd/asm/internal/asm/parse.go:185 +0x9ac
cmd/asm/internal/asm.(*Parser).Parse(0xc82007de70, 0xc820112060, 0xc820102120)
    src/cmd/asm/internal/asm/parse.go:86 +0x21
main.main()
    src/cmd/asm/main.go:59 +0xb85

go version devel +499c827 Thu Sep 3 03:02:17 2015 +0000 linux/amd64

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Sep 3, 2015
@gopherbot
Copy link

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

@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