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

Issue 1941933002: net: Prevent fuzzers from leaking on each iteration. (Closed)

Created:
4 years, 7 months ago by mmenke
Modified:
4 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ilya Sherman, Alexei Svitkine (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

net: Prevent fuzzers from leaking on each iteration. While the UMA macros use statics to avoid leaking, code that directly invokes base::Histogram::FactoryGet will keep on creating new objects on each iteration, unless the StatisticsRecorder has been initialized. This CL modifies net's Fuzzer infrastructure to ensure it is initialized. BUG=602440 Committed: https://crrev.com/0960f7561368543f46cc126d64820307728faa2f Cr-Commit-Position: refs/heads/master@{#391039}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M net/base/fuzzer_test_support.cc View 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (7 generated)
mmenke
Haven't tested this doesn't under ASAN, but have confirmed that this stops Histogram::Factory::Build from creating ...
4 years, 7 months ago (2016-05-02 18:38:07 UTC) #2
mmenke
On 2016/05/02 18:38:07, mmenke wrote: > Haven't tested this doesn't under ASAN, but have confirmed ...
4 years, 7 months ago (2016-05-02 18:38:29 UTC) #3
eroman
lgtm
4 years, 7 months ago (2016-05-02 19:09:15 UTC) #4
eroman
As an aside, this seems like a very mysterious way for histograms to work. Haven't ...
4 years, 7 months ago (2016-05-02 19:14:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941933002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941933002/1
4 years, 7 months ago (2016-05-02 19:15:15 UTC) #9
mmenke
I agree...This behavior (And even ownership semantics) aren't at all documented in the histogram APIs. ...
4 years, 7 months ago (2016-05-02 19:16:47 UTC) #10
Alexei Svitkine (slow)
I'd welcome a change to add more explanation of this on comments on FactoryGet() functions. ...
4 years, 7 months ago (2016-05-02 19:21:21 UTC) #12
eroman
+1 for a DCHECK. If we hit the DCHECK elsewhere I think those could be ...
4 years, 7 months ago (2016-05-02 19:31:31 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-02 20:08:44 UTC) #15
commit-bot: I haz the power
4 years, 7 months ago (2016-05-02 20:11:02 UTC) #17
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0960f7561368543f46cc126d64820307728faa2f
Cr-Commit-Position: refs/heads/master@{#391039}

Powered by Google App Engine
This is Rietveld 408576698