Commit 372fc681 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Fix undefined shift in LiveObjectRange::AdvanceToNextValidObject.

Bug: 
Change-Id: Ide7fab96e5ba1650aa17ba266e6ed2ed893208d7
Reviewed-on: https://chromium-review.googlesource.com/776658Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49446}
parent 5aa6f589
......@@ -408,7 +408,7 @@ void LiveObjectRange<mode>::iterator::AdvanceToNextValidObject() {
// Clear the first bit of the found object..
current_cell_ &= ~(1u << trailing_zeros);
uint32_t second_bit_index = 1u << (trailing_zeros + 1);
uint32_t second_bit_index = 0;
if (trailing_zeros >= Bitmap::kBitIndexMask) {
second_bit_index = 0x1;
// The overlapping case; there has to exist a cell after the current
......@@ -423,6 +423,8 @@ void LiveObjectRange<mode>::iterator::AdvanceToNextValidObject() {
}
cell_base_ = it_.CurrentCellBase();
current_cell_ = *it_.CurrentCell();
} else {
second_bit_index = 1u << (trailing_zeros + 1);
}
Map* map = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment