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/compile: FwdRef panic error while generating ssa view #51108

Closed
changkun opened this issue Feb 9, 2022 · 1 comment
Closed

cmd/compile: FwdRef panic error while generating ssa view #51108

changkun opened this issue Feb 9, 2022 · 1 comment
Labels
NeedsFix
Milestone

Comments

@changkun
Copy link
Member

@changkun changkun commented Feb 9, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18beta2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

// x.go
package foo

func testfn() {

	var b1 string
	var b2 []byte

	_ = string(b1) == string(b2)
	_ = string(b1) < string(b2)
}
GOSSAFUNC=testfn go tool compile x.go 

Open "before insert phis"

Check

v30 (9) = FwdRef <mem> {{[] %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)}}

Reported by @mark-pictor-csec, see also golang-design/ssaplayground#15

What did you expect to see?

No panic

What did you see instead?

Panic

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 9, 2022

Change https://go.dev/cl/384614 mentions this issue: cmd/compile:

@cherrymui cherrymui added the NeedsFix label Feb 11, 2022
@cherrymui cherrymui added this to the Unplanned milestone Feb 11, 2022
@dmitshur dmitshur removed this from the Unplanned milestone Mar 4, 2022
@dmitshur dmitshur added this to the Go1.19 milestone Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix
Projects
None yet
Development

No branches or pull requests

4 participants