mirror of
https://github.com/golang/go
synced 2025-10-03 13:59:41 +00:00
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>
459 B
459 B