aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/symtab.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2024-02-29 14:27:57 -0500
committerCherry Mui <cherryyz@google.com>2025-07-16 07:14:59 -0700
commitc876bf9346f1afb5471947a65fb1e105caeff433 (patch)
tree7ad880ca72091c7bab52e47d7ab518fb13c78c7e /src/runtime/symtab.go
parentb4309ece66ca989a38ed65404850a49ae8f92742 (diff)
downloadgo-c876bf9346f1afb5471947a65fb1e105caeff433.tar.xz
cmd/internal/obj/wasm: use 64-bit instructions for indirect calls
Currently, on Wasm, an indirect call is compiled to // function index = PC>>16, PC is already on stack I32WrapI64 I32Const $16 ShrU // set PC_B to 0 ... // actual call CallIndirect Specifically, the function index is extracted from bits 16-31 of the "PC". When there are more than 65536 functions, this will overflow and wrap around, causing wrong function being called. This CL changes it to use 64-bit operations to extract the function index from the "PC", so there are enough bits to for it. For #64856. Change-Id: I83c11db4b78cf66250e88ac02a82bd13730a8914 Reviewed-on: https://go-review.googlesource.com/c/go/+/567896 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/runtime/symtab.go')
0 files changed, 0 insertions, 0 deletions