]> Cypherpunks repositories - gostls13.git/commit
runtime, cmd/link: tighten search for stackObjectRecord
authorIan Lance Taylor <iant@golang.org>
Wed, 10 Dec 2025 02:56:45 +0000 (18:56 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 12 Dec 2025 21:23:17 +0000 (13:23 -0800)
commitee0275d15b4407038d30e27c9cc313c4ef339026
tree7e77ce3b703dcfc97f7de79a68d61a788002feee
parent63fced531c0d702554fcfda41f9016701a6859c6
runtime, cmd/link: tighten search for stackObjectRecord

A stackObjectRecord should always be in funcdata, between gofunc
and the end of pclntab, except for the special case of
methodValueCallFrameObjs, which should always be in noptrbss.
Adjust the two loops that look for the moduledata corresponding
to a stackObjectRecord to search more precisely, rather than
relying on datap.end.

Closely based on a patch by Michael Stapelberg.

For #76038

Change-Id: I751801d8fd030af751825a67905b2a343280e7d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/728840
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/link/internal/ld/symtab.go
src/runtime/stack.go
src/runtime/stkframe.go
src/runtime/symtab.go