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 (3) #12614

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

cmd/asm: nil deref (3) #12614

dvyukov opened this issue Sep 14, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 14, 2015

asm crashes on the following input (in hex):

00000000  47 4c 4f 42 4c 20 61 2c  00 30 24 53 42 0a        |GLOBL a,.0$SB.|
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4b0501]

goroutine 1 [running]:
cmd/internal/obj.Mconv(0xc82007d8d0, 0x0, 0x0)
    src/cmd/internal/obj/util.go:460 +0x661
cmd/internal/obj.Dconv(0x70fce0, 0xc82007d8d0, 0x0, 0x0)
    src/cmd/internal/obj/util.go:384 +0xc0c
cmd/asm/internal/asm.(*Parser).validateImmediate(0xc82007de70, 0x6083c0, 0x5, 0xc82007d8d0)
    src/cmd/asm/internal/asm/asm.go:88 +0x87
cmd/asm/internal/asm.(*Parser).asmGlobl(0xc82007de70, 0xc82010a0a0, 0x5, 0xc82007db28, 0x2, 0x3)
    src/cmd/asm/internal/asm/asm.go:249 +0x21f
cmd/asm/internal/asm.(*Parser).pseudo(0xc82007de70, 0x8, 0xc82010a0a0, 0x5, 0xc82007db28, 0x2, 0x3)
    src/cmd/asm/internal/asm/parse.go:221 +0x1c4
cmd/asm/internal/asm.(*Parser).line(0xc82007de70, 0xc820112060)
    src/cmd/asm/internal/asm/parse.go:185 +0x990
cmd/asm/internal/asm.(*Parser).Parse(0xc82007de70, 0xc820112060, 0xc820102120)
    src/cmd/asm/internal/asm/parse.go:85 +0x21
main.main()
    src/cmd/asm/main.go:59 +0xb85

go version devel +b9dbb03 Mon Sep 14 04:51:46 2015 +0000 linux/amd64

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

CL https://golang.org/cl/14563 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