Chromium Code Reviews
DescriptionFix multibuffer crashing bug
The multibuffer reader had a problem where it would unpin a block if it was initialized
with a position that was not divisible by the block size. This generally only happens
on a redirect. When this happens, everything was fine up until the multibuffer is freed, where
it would crash when it tried to remove a pinned block from the global LRU.
Seval actions taken:
o Add a test that covers the redirect path properly
* this uncovered another bug where the data size was incorrectly calculated (fixed)
o Fix it so that if blocks are pinned in ~MultiBuffer, we don't crash unless we're in debug mode.
o Add DCHECKS to make sure that pin counts don't go negative.
o Fix multibuffer reader so that it always unpins exactly what it pinned, no more, no less.
BUG=591359
Committed: https://crrev.com/5b6dbf76bfa39c24ad97c29ac8a8a0c44dcf3099
Cr-Commit-Position: refs/heads/master@{#378925}
Patch Set 1 #
Total comments: 12
Patch Set 2 : DCHECK -> CHECK #
Messages
Total messages: 15 (4 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||