aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2021-09-21 13:48:23 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2021-09-27 20:58:24 +0000
commit6c163e5ac9cdb258566f1287de7915a2fd30a0de (patch)
tree88b75c49a5012c99d4f1e3885119eaed3482d16c /src/runtime/stack.go
parente54843f2f4c3b11b52b691eaa187871fb4355d4c (diff)
downloadgo-6c163e5ac9cdb258566f1287de7915a2fd30a0de.tar.xz
runtime: change funcinl sentinel value from 0 to ^0
_func and funcinl are type-punned. We distinguish them at runtime by inspecting the first word. Prior to this change, we used 0 as the sentinel value that means that a Func is a funcinl. That worked because _func's first word is the functions' entry PC, and 0 is not a valid PC. I plan to make *_func's entry PC relative to the containing module. As a result, 0 will be a valid value, for the first function in the module. Switch to ^0 as the new sentinel value, which is neither a valid entry PC nor a valid PC offset. Change-Id: I4c718523a083ed6edd57767c3548640681993522 Reviewed-on: https://go-review.googlesource.com/c/go/+/351459 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions