DescriptionCrash when we notice a corruption of the histogram range-vector
The range vector is calculated once when a histogram is
constructed, and should never change over the lifetime of the
histogram. When it does change, it means that memory is being
overwritten. We now crash (via CHECK) when there is any
detected corruption of the range vector.
This CL uses a more robust check-sum algorithm to detect corruption
of the vector. The previous algorithm just did a sum, and was
too easilly tricked by small (offsetting) changes in several
ranges. Hopefully, this CRC-32 implementation will not be
so easilly fooled.
I had to refactor the class to ensure that each histogram was completely
constructed before I registered it. The old code could sometimes
register a base class (tradtional Histogram, with exponential
bucket spread) and then run the derived constructor (such as
when creating a LinearHistogram, with a second construction
of the ranges and checksum). I now carefully avoid
generating the checksum until fully constructing the instance,
and then I run InitializeBuckets only once on
the instance before registering it.
bug=73939
r=mbelshe
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76239
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #Patch Set 6 : '' #Patch Set 7 : '' #Patch Set 8 : '' #Patch Set 9 : '' #Patch Set 10 : '' #Patch Set 11 : '' #
Total comments: 6
Patch Set 12 : '' #Patch Set 13 : '' #Patch Set 14 : '' #Patch Set 15 : '' #Patch Set 16 : '' #Patch Set 17 : '' #Patch Set 18 : '' #Patch Set 19 : '' #Patch Set 20 : '' #Patch Set 21 : '' #
Total comments: 1
Patch Set 22 : '' #
Total comments: 6
Messages
Total messages: 11 (0 generated)
|