]> Cypherpunks repositories - gostls13.git/commit
runtime: replace cgoCtxt slice with index in traceback
authorAustin Clements <austin@google.com>
Thu, 9 Feb 2023 19:40:05 +0000 (14:40 -0500)
committerAustin Clements <austin@google.com>
Fri, 10 Mar 2023 17:59:27 +0000 (17:59 +0000)
commit86b69ef329c346fc6cc9b262e97bbdce7322288c
treeb2281846b8c7a20982debfee440a74af405618ee
parentec319d6d430d2b64c59ad3f8842048b3d79efae1
runtime: replace cgoCtxt slice with index in traceback

Currently, gentraceback consumes the gp.cgoCtxt slice by copying the
slice header and then sub-slicing it as it unwinds. The code for this
is nice and clear, but we're about to lift this state into a structure
and mutating it is going to introduce write barriers that are
disallowed in gentraceback.

This CL replaces the mutable slice header with an index into
gp.cgoCtxt.

For #54466.

Change-Id: I6b701bb67d657290a784baaca34ed02d8247ede2
Reviewed-on: https://go-review.googlesource.com/c/go/+/466863
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/traceback.go