aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2023-10-13 10:32:57 +0700
committerGopher Robot <gobot@golang.org>2023-10-18 16:32:07 +0000
commitda7ac77380f68ed855ab4565c4ef2217249c53c2 (patch)
treeb4fad76b635470e607faf9a1b68d73ba0a798731 /src/runtime/panic.go
parent80834af2063962bad87a56f0f45546cc18f30a9c (diff)
downloadgo-da7ac77380f68ed855ab4565c4ef2217249c53c2.tar.xz
cmd/compile: fix funcdata encode for functions with large frame size
The funcdata is encoded as varint, with the upper limit set to 1e9. However, the stack offsets could be up to 1<<30. Thus emitOpenDeferInfo will trigger an ICE for function with large frame size. By using binary.PutUvarint, the frame offset could be encoded correctly for value larger than 1<<35, allow the compiler to report the error. Further, the runtime also do validation when reading in the funcdata value, so a bad offset won't likely cause mis-behavior. Fixes #52697 Change-Id: I084c243c5d24c5d31cc22d5b439f0889e42b107c Reviewed-on: https://go-review.googlesource.com/c/go/+/535077 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/runtime/panic.go')
0 files changed, 0 insertions, 0 deletions