]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.3] runtime: hide cgocallback_gofunc calling cgocallbackg from...
authorRuss Cox <rsc@golang.org>
Tue, 30 Sep 2014 01:23:52 +0000 (21:23 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 30 Sep 2014 01:23:52 +0000 (21:23 -0400)
commitca70c918920b26ae1b88afb7d7a82748677d354f
tree4ebed7d2383b79533680e43f8e905480f2249e87
parent3fa6b988e0dfc910f3d42d8f12346cfdbb143a69
[release-branch.go1.3] runtime: hide cgocallback_gofunc calling cgocallbackg from linker

The linker error at
http://build.golang.org/log/42c57ff6b57ab36f6622417108bb5697e4d36fa7
is a false positive: cgocallback_gofunc is invoked on the g0 stack,
as explained in its comments, and then it switches to the m->curg
stack to invoke cgocallbackg. Checking the stacksplit sequence
on the g0 stack doesn't make sense, nor does carrying a check
that starts on the g0 stack over to the curg stack.
Change the code to use an indirect call so that the linker
stacksplit check does not follow through it.

LGTM=bradfitz, adg
R=golang-codereviews, bradfitz, adg
CC=golang-codereviews, iant, r
https://golang.org/cl/146510043
src/pkg/runtime/asm_amd64.s