Index: src/heap/slot-set.h |
diff --git a/src/heap/slot-set.h b/src/heap/slot-set.h |
index 0066bf57b6cf2e8196d5bec24c3ba593a1823d71..651af88bf8ffc5e4118f1c352faaf2152d5637ed 100644 |
--- a/src/heap/slot-set.h |
+++ b/src/heap/slot-set.h |
@@ -194,9 +194,15 @@ class SlotSet : public Malloced { |
} |
void MaskCell(int bucket_index, int cell_index, uint32_t mask) { |
- uint32_t* cells = bucket[bucket_index]; |
- if (cells != nullptr && cells[cell_index] != 0) { |
- cells[cell_index] &= mask; |
+ if (bucket_index < kBuckets) { |
+ uint32_t* cells = bucket[bucket_index]; |
+ if (cells != nullptr && cells[cell_index] != 0) { |
+ cells[cell_index] &= mask; |
+ } |
+ } else { |
+ // GCC bug 59124: Emits wrong warnings |
+ // "array subscript is above array bounds" |
+ UNREACHABLE(); |
} |
} |