]> Cypherpunks repositories - gostls13.git/commit
runtime: avoid variable/function alias on runtime._cgo_panic_internal
authorAustin Clements <austin@google.com>
Thu, 1 Nov 2018 00:39:59 +0000 (20:39 -0400)
committerAustin Clements <austin@google.com>
Mon, 12 Nov 2018 20:27:17 +0000 (20:27 +0000)
commit6096b85b1326c22ec07c2aed2d78f3bef513ea69
treec2e2db23b11695cbfa7ceaad63b6f279fafa2992
parentef7ce57ac2da02aeceada27761c282e0718c6e14
runtime: avoid variable/function alias on runtime._cgo_panic_internal

The symbol runtime._cgo_panic_internal is defined both as a function
in package runtime and as a (linknamed) variable in package
runtime/cgo. Since we're introducing function ABIs, this is going to
cause problems with resolving the ABI-marked function symbol with the
unmarked data symbol. It's also confusing.

Fix this by declaring runtime._cgo_panic_internal as a function in
runtime/cgo as well and extracting the PC from the function object.

For #27539.

Change-Id: I148a458a600cf9e57791cf4cbe92e79bddbf58d4
Reviewed-on: https://go-review.googlesource.com/c/146821
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/callbacks.go