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

Issue 145930043: code review 145930043: runtime: update docs, code for SetFinalizer (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by rsc
Modified:
10 years, 5 months ago
Reviewers:
r, gobot, iant, rlh
CC:
golang-codereviews, iant, r, dvyukov, khr
Visibility:
Public.

Description

runtime: update docs, code for SetFinalizer At last minute before 1.3 we relaxed SetFinalizer to avoid crashes when you pass the result of a global alloc to it. This avoids the crash but makes SetFinalizer a bit too relaxed. Document that the finalizer of a global allocation may not run. Tighten the SetFinalizer check to ignore a global allocation but not ignore everything else. Fixes issue 7656.

Patch Set 1 #

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

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

Total comments: 2

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

Total comments: 2

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -17 lines) Patch
M src/runtime/malloc.go View 1 2 3 3 chunks +23 lines, -14 lines 0 comments Download
M src/runtime/mfinal_test.go View 1 2 2 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 11
rsc
Hello golang-codereviews@googlegroups.com (cc: dvyukov, iant, khr, r, rlh), I'd like you to review this change ...
10 years, 5 months ago (2014-10-06 15:27:20 UTC) #1
iant
https://codereview.appspot.com/145930043/diff/40001/src/runtime/malloc.go File src/runtime/malloc.go (right): https://codereview.appspot.com/145930043/diff/40001/src/runtime/malloc.go#newcode573 src/runtime/malloc.go:573: } It seems that we should have an error ...
10 years, 5 months ago (2014-10-06 16:00:14 UTC) #2
rsc
Hello golang-codereviews@googlegroups.com, iant@golang.org (cc: dvyukov@google.com, golang-codereviews@googlegroups.com, khr@golang.org, r@golang.org, rlh@golang.org), Please take another look.
10 years, 5 months ago (2014-10-06 16:13:46 UTC) #3
rsc
https://codereview.appspot.com/145930043/diff/40001/src/runtime/malloc.go File src/runtime/malloc.go (right): https://codereview.appspot.com/145930043/diff/40001/src/runtime/malloc.go#newcode573 src/runtime/malloc.go:573: } On 2014/10/06 16:00:14, iant wrote: > It seems ...
10 years, 5 months ago (2014-10-06 16:14:37 UTC) #4
r
words LGTM
10 years, 5 months ago (2014-10-06 16:25:28 UTC) #5
iant
LGTM
10 years, 5 months ago (2014-10-06 16:36:14 UTC) #6
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=38965cf3cec6 *** runtime: update docs, code for SetFinalizer At last minute before ...
10 years, 5 months ago (2014-10-06 18:18:15 UTC) #7
rlh
LGTM but with the caveat that we should not spec that finalizers will be run ...
10 years, 5 months ago (2014-10-06 18:27:01 UTC) #8
rsc
https://codereview.appspot.com/145930043/diff/60001/src/runtime/mfinal_test.go File src/runtime/mfinal_test.go (right): https://codereview.appspot.com/145930043/diff/60001/src/runtime/mfinal_test.go#newcode68 src/runtime/mfinal_test.go:68: t.Errorf("#%d: finalizer for type %T didn't run", i, tt.finalizer) ...
10 years, 5 months ago (2014-10-06 18:34:11 UTC) #9
rlh
LGTM On Mon, Oct 6, 2014 at 2:34 PM, <rsc@golang.org> wrote: > > https://codereview.appspot.com/145930043/diff/60001/src/ > ...
10 years, 5 months ago (2014-10-06 18:37:16 UTC) #10
gobot
10 years, 5 months ago (2014-10-07 02:29:45 UTC) #11
Message was sent while issue was closed.
This CL appears to have broken the netbsd-amd64-bsiegert builder.
See http://build.golang.org/log/7137fabc2ccb991ed0dad77f85959592aae8549c
Sign in to reply to this message.

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