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

Issue 10784043: code review 10784043: runtime: fix memory leaks due to defers (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by dvyukov
Modified:
10 years, 9 months ago
Reviewers:
rsc
CC:
golang-dev, dave_cheney.net, rsc
Visibility:
Public.

Description

runtime: fix memory leaks due to defers fn can clearly hold a closure in memory. argp/pc point into stack and so can hold in memory a block that was previously a large stack serment.

Patch Set 1 #

Patch Set 2 : diff -r c224c549a3c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r c224c549a3c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r c224c549a3c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -1 line) Patch
M src/pkg/runtime/panic.c View 1 1 chunk +5 lines, -1 line 0 comments Download
A test/deferfin.go View 1 2 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 6
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 10 months ago (2013-06-29 13:04:18 UTC) #1
dvyukov
It should help with a somewhat common idiom: x, cleanup := foo() defer cleanup() Currently ...
10 years, 10 months ago (2013-06-29 13:05:31 UTC) #2
dave_cheney.net
wow. On Sat, Jun 29, 2013 at 11:05 PM, <dvyukov@google.com> wrote: > It should help ...
10 years, 10 months ago (2013-06-29 13:06:03 UTC) #3
rsc
LGTM
10 years, 10 months ago (2013-07-01 21:35:50 UTC) #4
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=0f6938710930 *** runtime: fix memory leaks due to defers fn can clearly ...
10 years, 10 months ago (2013-07-01 21:36:12 UTC) #5
remyoudompheng
10 years, 9 months ago (2013-07-20 21:19:32 UTC) #6
R=close
Sign in to reply to this message.

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