You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks kinda like #64606, but I don't think it is directly related.
I think what is going on here is that sccp is trying to optimize unreachable code. That unreachable code fails the invariant that jump table indexes are in range. I'm not entirely sure whether some previous phase is generating bad unreachable jump tables, or whether we just need to defend against unreachable code. I'll look some more.
(The unreachable code is the jump table in the body of NewNotificationFromString inlined into main at the last callsite in main. It is unreachable because we compare the string length and it is shorter than any string in the case statement.)
The input index to a jump table can be out of range for unreachable code.
Dynamically the compiler ensures that an out-of-range index can never
reach a jump table, but that guarantee doesn't extend to the static
realm.
Fixesgolang#64826
Change-Id: I5829f3933ae5124ffad8337dfd7dd75e67a8ec33
Reviewed-on: https://go-review.googlesource.com/c/go/+/552055
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: David Chase <[email protected]>
Go version
go version go1.22rc1 X:nocoverageredesign darwin/arm64
What operating system and processor architecture are you using (
go env
)?What did you do?
https://go.dev/play/p/tuaTn9Ke1VG?v=gotip
What did you expect to see?
I expect the program to compile
What did you see instead?
The text was updated successfully, but these errors were encountered: