]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle OCLOSURE/OCALLPART in mustHeapAlloc check
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 27 Jul 2020 05:08:56 +0000 (12:08 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 15 Aug 2020 03:09:35 +0000 (03:09 +0000)
commit82c45eb68187d7827bca392d528dbfa06607e3f0
tree4fe99515ac8a66ba423f3416ee734b35af0df3a1
parent0031fa80a3c6685e44e84533edbae0dad0eb0395
cmd/compile: handle OCLOSURE/OCALLPART in mustHeapAlloc check

Currently, generated struct wrapper for closure is not handled in
mustHeapAlloc. That causes compiler crashes when the wrapper struct
is too large for stack, and must be heap allocated instead.

Fixes #39292

Change-Id: I14c1e591681d9d92317bb2396d6cf5207aa93e08
Reviewed-on: https://go-review.googlesource.com/c/go/+/244917
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/esc.go
test/fixedbugs/issue39292.go [new file with mode: 0644]