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: internal compiler error: 'f': value .autotmp_1 (nil) incorrectly live at entry #61778

Closed
ALTree opened this issue Aug 5, 2023 · 4 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Aug 5, 2023

$ go version
go version go1.21rc4 linux/amd64

$ gotip version
go version devel go1.22-a09ea59 Wed Aug 2 15:25:43 2023 +0000 linux/amd64
package p

func f(s []byte) {
	switch "" {
	case string(append(s, 'a')):
	}
}
$ gotip build crash.go
# command-line-arguments
./crash.go:3:6: internal compiler error: 'f': value .autotmp_1 (nil) incorrectly live at entry

goroutine 9 [running]:
runtime/debug.Stack()
	./desktop/gotip/src/runtime/debug/stack.go:24 +0x5e
cmd/compile/internal/base.FatalfAt({0x137ee0?, 0xc0?}, {0xc00002c9c0, 0x2d}, {0xc00040f050, 0x3, 0x3})
	./desktop/gotip/src/cmd/compile/internal/base/print.go:230 +0x1d7
cmd/compile/internal/base.Fatalf(...)
	./desktop/gotip/src/cmd/compile/internal/base/print.go:199
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0x20?, {0x7ca8b108?, 0x7f0c?}, {0xd8a3e5, 0x27}, {0xc000039b40, 0x2, 0xc000137f70?})
	./desktop/gotip/src/cmd/compile/internal/ssagen/ssa.go:8018 +0x16a
cmd/compile/internal/ssa.(*Func).Fatalf(0xc0003fed00, {0xd8a3e5, 0x27}, {0xc000039b40, 0x2, 0x2})
	./desktop/gotip/src/cmd/compile/internal/ssa/func.go:716 +0x279
cmd/compile/internal/ssagen.(*state).variable(0xc000022500, {0xeccbd8, 0xc000410bb0}, 0xec7a80?)
	./desktop/gotip/src/cmd/compile/internal/ssagen/ssa.go:6674 +0x145

...

Doesn't crash on 1.20.7

cc @golang/compiler

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 5, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 5, 2023
@cuonglm cuonglm self-assigned this Aug 5, 2023
@cuonglm cuonglm added release-blocker and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 5, 2023
@cuonglm cuonglm added this to the Go1.21 milestone Aug 5, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/516375 mentions this issue: cmd/compile: fix missing init nodes for len(string([]byte)) optimization

@cuonglm
Copy link
Member

cuonglm commented Aug 5, 2023

@gopherbot please backport this to go1.21

The ICE introduced in CL 497276, where an optimization for len(string([]byte)) was added.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #61781 (for 1.21).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 6, 2023
@dmitshur
Copy link
Contributor

dmitshur commented Aug 7, 2023

Moving to Go1.22 milestone, since by now the main branch represents Go 1.22 development, so even though gopherbot marked this as closed, it's not resolved in Go 1.21. Issue #61781 that tracks its backport to release-branch.go1.21 was automatically added to the Go 1.21.1 milestone. (FYI @golang/release, @mknyszek.)

@dmitshur dmitshur modified the milestones: Go1.21, Go1.22 Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants