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
I compiled the above code using Go 1.22.5 and Go 1.23rc2 respectively, and their compilation results were different: Go 1.22.5 failed to compile, while Go 1.23rc2 succeeded.
For go1.23rc2, the compiler does not detect string out-of-bounds issues at compile time and successfully compiles the code. (Of course, the program will panic at runtime.) https://go.dev/play/p/XjprxSMgyNe?v=gotip
What did you expect to see?
Some string out-of-bounds issues that can be detected by the go1.22.5(and go1.21.12) compiler are no longer detected by go1.23rc2. I am unsure whether this is due to changes in static analysis or other reasons, but it appears to be a degradation of capability.
The text was updated successfully, but these errors were encountered:
Go version
go version go1.23rc2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I compiled the above code using Go 1.22.5 and Go 1.23rc2 respectively, and their compilation results were different: Go 1.22.5 failed to compile, while Go 1.23rc2 succeeded.
What did you see happen?
For go1.22.5(and go1.21.12), the compiler detects string out-of-bounds issues at compile time and fails to compile.
https://go.dev/play/p/XjprxSMgyNe
https://go.dev/play/p/XjprxSMgyNe?v=goprev
For go1.23rc2, the compiler does not detect string out-of-bounds issues at compile time and successfully compiles the code. (Of course, the program will panic at runtime.)
https://go.dev/play/p/XjprxSMgyNe?v=gotip
What did you expect to see?
Some string out-of-bounds issues that can be detected by the go1.22.5(and go1.21.12) compiler are no longer detected by go1.23rc2. I am unsure whether this is due to changes in static analysis or other reasons, but it appears to be a degradation of capability.
The text was updated successfully, but these errors were encountered: