golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.37k stars 17.71k forks source link

cmd/compile: mysterious crashes and non-determinism with range over func [1.23 backport] #69511

Closed gopherbot closed 2 months ago

gopherbot commented 2 months ago

@ianlancetaylor requested issue #69507 to be considered for backport to the next 1.23 minor release.

@gopherbot Please open a backport to 1.23.

This appears to be a compiler bug related to the range-over-function code. The compiler is generating bad code--a variable that escapes is stack-allocated. There is no workaround (other than avoiding range-over-func).

gopherbot commented 2 months ago

Change https://go.dev/cl/614195 mentions this issue: [release-branch.go1.23] cmd/compile: fix wrong esacpe analysis for rangefunc

cagedmantis commented 2 months ago

This was approved last week. It is a serious issue without a workaround.

gopherbot commented 2 months ago

Closed by merging CL 614195 (commit fbddfae62f19b5f04555aa593970ac4c6f5a38e5) to release-branch.go1.23.