Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1390)

Issue 160490: Add defensive code in pickle to preclude realloc of shared header_ memory.... (Closed)

Created:
11 years, 4 months ago by jar (doing other things)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw
Visibility:
Public.

Description

Add defensive code in pickle to preclude realloc of shared header_ memory. Since I was able to (some how) generate a problem with header_ being double freed (perhaps, because it was shared in some way??), this change adds several lines of defensive coding. The current assignment operator appears very dangerous, as it allowed Resize to be called when the header_ was not owned by the instance (it was read-only). I haven't found a path to cause a problem, but we may as well be defensive. BUG=17027 BUG=17088 r=CPU Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22261

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M base/pickle.cc View 1 2 2 chunks +7 lines, -2 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
jar (doing other things)
11 years, 4 months ago (2009-08-01 01:59:10 UTC) #1
darin (slow to review)
LGTM http://codereview.chromium.org/160490/diff/1/2 File base/pickle.cc (right): http://codereview.chromium.org/160490/diff/1/2#newcode68 Line 68: if (capacity_ >= kCapacityReadOnly) { nit: the ...
11 years, 4 months ago (2009-08-03 06:32:18 UTC) #2
jar (doing other things)
Changes made per Darin's suggestions. http://codereview.chromium.org/160490/diff/1/2 File base/pickle.cc (right): http://codereview.chromium.org/160490/diff/1/2#newcode68 Line 68: if (capacity_ >= ...
11 years, 4 months ago (2009-08-03 06:48:35 UTC) #3
cpu_(ooo_6.6-7.5)
http://codereview.chromium.org/160490/diff/1005/7 File base/pickle.cc (right): http://codereview.chromium.org/160490/diff/1005/7#newcode67 Line 67: Pickle& Pickle::operator=(const Pickle& other) { this operator is ...
11 years, 4 months ago (2009-08-03 16:18:57 UTC) #4
jar (doing other things)
http://codereview.chromium.org/160490/diff/1005/7 File base/pickle.cc (right): http://codereview.chromium.org/160490/diff/1005/7#newcode67 Line 67: Pickle& Pickle::operator=(const Pickle& other) { On 2009/08/03 16:18:57, ...
11 years, 4 months ago (2009-08-03 20:11:22 UTC) #5
jim.roskind
11 years, 4 months ago (2009-08-08 01:18:00 UTC) #6
LGTM

Powered by Google App Engine
This is Rietveld 408576698