Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2895)

Issue 146510043: code review 146510043: [release-branch.go1.3] runtime: hide cgocallback_gofunc... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by rsc
Modified:
9 years, 6 months ago
Reviewers:
adg, bradfitz
CC:
golang-codereviews, bradfitz, adg, iant, r
Visibility:
Public.

Description

[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.

Patch Set 1 #

Patch Set 2 : diff -r 85518b1d6f8d https://code.google.com/p/go/ #

Patch Set 3 : diff -r 85518b1d6f8d https://code.google.com/p/go/ #

Patch Set 4 : diff -r 85518b1d6f8d https://code.google.com/p/go/ #

Patch Set 5 : diff -r b2974dc26ab7 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M src/pkg/runtime/asm_amd64.s View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 4
rsc
Hello golang-codereviews@googlegroups.com (cc: adg, iant, r), I'd like you to review this change to https://code.google.com/p/go/
9 years, 6 months ago (2014-09-30 00:50:00 UTC) #1
bradfitz
LGTM On Mon, Sep 29, 2014 at 5:50 PM, <rsc@golang.org> wrote: > Reviewers: golang-codereviews, > ...
9 years, 6 months ago (2014-09-30 01:15:20 UTC) #2
adg
LGTM but I don't say so from a position of authority
9 years, 6 months ago (2014-09-30 01:16:39 UTC) #3
rsc
9 years, 6 months ago (2014-09-30 01:23:58 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=f1046f988c1a ***

[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://codereview.appspot.com/146510043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b