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

Issue 10210043: code review 10210043: cmd/gc: save local var list before inlining (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by iant
Modified:
10 years, 9 months ago
Reviewers:
dfc, khr1
CC:
golang-dev, khr1, dfc
Visibility:
Public.

Description

cmd/gc: save local var list before inlining This avoids problems with inlining in genwrappers, which occurs after functions have been compiled. Compiling a function may cause some unused local vars to be removed from the list. Since a local var may be unused due to optimization, it is possible that a removed local var winds up beingused in the inlined version, in which case hilarity ensues. Fixes issue 5515.

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -2 lines) Patch
M src/cmd/gc/go.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/inl.c View 2 chunks +3 lines, -2 lines 0 comments Download
A test/fixedbugs/issue5515.go View 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 5
iant
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 9 months ago (2013-06-12 01:49:59 UTC) #1
khr1
LGTM Why don't you have to do this for non-local functions? On Tue, Jun 11, ...
10 years, 9 months ago (2013-06-12 01:55:13 UTC) #2
dfc
LGTM. Passes on linux/386, I guess the cost of another word in the Node structure ...
10 years, 9 months ago (2013-06-12 02:25:15 UTC) #3
iant
On 2013/06/12 01:55:13, khr1 wrote: > LGTM > > Why don't you have to do ...
10 years, 9 months ago (2013-06-12 03:22:57 UTC) #4
iant
10 years, 9 months ago (2013-06-12 03:23:26 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=b357e33bb414 ***

cmd/gc: save local var list before inlining

This avoids problems with inlining in genwrappers, which
occurs after functions have been compiled.  Compiling a
function may cause some unused local vars to be removed from
the list.  Since a local var may be unused due to
optimization, it is possible that a removed local var winds up
beingused in the inlined version, in which case hilarity
ensues.

Fixes issue 5515.

R=golang-dev, khr, dave
CC=golang-dev
https://codereview.appspot.com/10210043
Sign in to reply to this message.

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