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

Issue 4261046: code review 4261046: cgo: use correct frame size for 0 arguments (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by rsc
Modified:
14 years, 2 months ago
Reviewers:
CC:
iant, golang-dev
Visibility:
Public.

Description

cgo: use correct frame size for 0 arguments Passing a frame size of 1 was causing the cgo callback to push 1 byte of arguments onto the stack, making the stack pointer misaligned, which had the effect of hiding all the pointers on the stack from the garbage collector. SWIG only wraps calls to C++ virtual methods, so it always has at least 1 argument, so SWIG does not need to be fixed too. Fixes issue 1328.

Patch Set 1 #

Patch Set 2 : diff -r eac39e39fc84 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r eac39e39fc84 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r fad2d06b2ff5 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M src/cmd/cgo/out.go View 1 4 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello iant (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 2 months ago (2011-03-04 20:58:29 UTC) #1
iant
LGTM
14 years, 2 months ago (2011-03-04 21:53:03 UTC) #2
rsc
14 years, 2 months ago (2011-03-05 19:24:46 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=5c4996cd19d4 ***

cgo: use correct frame size for 0 arguments

Passing a frame size of 1 was causing the cgo callback
to push 1 byte of arguments onto the stack, making
the stack pointer misaligned, which had the effect of
hiding all the pointers on the stack from the garbage
collector.

SWIG only wraps calls to C++ virtual methods, so it
always has at least 1 argument, so SWIG does not need
to be fixed too.

Fixes issue 1328.

R=iant
CC=golang-dev
http://codereview.appspot.com/4261046
Sign in to reply to this message.

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