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

Issue 7913043: code review 7913043: runtime: prevent garbage collection during hashmap insertion (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by atom
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-dev, minux1, rsc
Visibility:
Public.

Description

runtime: prevent garbage collection during hashmap insertion Inserting a key-value pair into a hashmap storing keys or values indirectly can cause the garbage collector to find the hashmap in an inconsistent state. Fixes issue 5074.

Patch Set 1 #

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

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

Total comments: 2

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -4 lines) Patch
M src/pkg/runtime/gc_test.go View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download
M src/pkg/runtime/hashmap.c View 1 chunk +4 lines, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 chunk +14 lines, -2 lines 0 comments Download

Messages

Total messages: 9
atom
Hello golang-dev@googlegroups.com (cc: dave@cheney.net), I'd like you to review this change to https://code.google.com/p/go/
11 years, 1 month ago (2013-03-19 20:05:05 UTC) #1
minux1
code looks reasonable, could we make a test for it? is channel affected by this ...
11 years, 1 month ago (2013-03-19 20:14:01 UTC) #2
ugorji
On 2013/03/19 20:05:05, atom wrote: > Hello mailto:golang-dev@googlegroups.com (cc: mailto:dave@cheney.net), > > I'd like you ...
11 years, 1 month ago (2013-03-19 20:23:17 UTC) #3
atom
On 2013/03/19 20:14:01, minux wrote: > is channel affected by this issue? Probably not.
11 years, 1 month ago (2013-03-19 20:26:53 UTC) #4
rsc
LGTM
11 years, 1 month ago (2013-03-19 20:29:37 UTC) #5
atom
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, ugorji@gmail.com, rsc@golang.org (cc: dave@cheney.net, golang-dev@googlegroups.com), Please take another look.
11 years, 1 month ago (2013-03-19 20:53:55 UTC) #6
rsc
LGTM https://codereview.appspot.com/7913043/diff/10001/src/pkg/runtime/gc_test.go File src/pkg/runtime/gc_test.go (right): https://codereview.appspot.com/7913043/diff/10001/src/pkg/runtime/gc_test.go#newcode87 src/pkg/runtime/gc_test.go:87: type T struct { you might try defer ...
11 years, 1 month ago (2013-03-19 20:57:39 UTC) #7
atom
https://codereview.appspot.com/7913043/diff/10001/src/pkg/runtime/gc_test.go File src/pkg/runtime/gc_test.go (right): https://codereview.appspot.com/7913043/diff/10001/src/pkg/runtime/gc_test.go#newcode87 src/pkg/runtime/gc_test.go:87: type T struct { On 2013/03/19 20:57:40, rsc wrote: ...
11 years, 1 month ago (2013-03-19 21:16:56 UTC) #8
atom
11 years, 1 month ago (2013-03-19 21:17:55 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=53c873e9f93d ***

runtime: prevent garbage collection during hashmap insertion

Inserting a key-value pair into a hashmap storing keys or values
indirectly can cause the garbage collector to find the hashmap in
an inconsistent	state.

Fixes issue 5074.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://codereview.appspot.com/7913043
Sign in to reply to this message.

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