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 in LOOP (PC) #12655

Closed
dvyukov opened this issue Sep 17, 2015 · 2 comments
Closed

cmd/asm: nil deref in LOOP (PC) #12655

dvyukov opened this issue Sep 17, 2015 · 2 comments

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 17, 2015

cmd/asm crashes on the following special kind of modem noise:

TEXT C(SB),$0
LOOP(PC)
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0xf6 pc=0x57b0a7]

goroutine 1 [running]:
cmd/internal/obj/x86.xfol(0xc820116000, 0xc820122140, 0xc82007d7a8)
    src/cmd/internal/obj/x86/obj6.go:1174 +0x357
cmd/internal/obj/x86.follow(0xc820116000, 0xc82011e000)
    src/cmd/internal/obj/x86/obj6.go:965 +0xca
cmd/internal/obj.Writeobjdirect(0xc820116000, 0xc82000a360)
    src/cmd/internal/obj/objfile.go:295 +0x30f
main.main()
    src/cmd/asm/main.go:65 +0xd9b

go version devel +5512ac2 Wed Sep 16 17:56:14 2015 +0000 linux/amd64

@robpike
Copy link
Contributor

robpike commented Sep 17, 2015

As far as I can tell, this is a valid (ish) assembly program and obj is mishandling it. Reassigning.

@robpike robpike assigned rsc and unassigned robpike Sep 17, 2015
@rsc rsc changed the title cmd/asm: nil deref (5) cmd/asm: nil deref in LOOP (PC) Oct 23, 2015
@rsc rsc added this to the Go1.6 milestone Oct 23, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Dec 5, 2015
@quasilyte
Copy link
Contributor

Can't be reproduced since go1.9 (and above).

@robpike robpike closed this as completed Dec 9, 2018
@golang golang locked and limited conversation to collaborators Dec 9, 2019
@rsc rsc removed their assignment 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

5 participants