Work around ICE bugs with MIPS GCC and O1.
Also, work around GCC warning bugs where array accesses with explicit
bounds checks are flagged as being out-of-bounds. Significantly, clean-up
the HandleScope so the array accesses don't appear out-of-bounds at compile
time.
Change-Id: I5d66567559cc1f97cd0aa02c0df8575ebadbfe3d
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index 8374ff7..ad7f901 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -285,7 +285,7 @@
// Returns the byte size of the bracket size from the index.
static size_t IndexToBracketSize(size_t idx) {
- DCHECK(idx < kNumOfSizeBrackets);
+ DCHECK_LT(idx, kNumOfSizeBrackets);
return bracketSizes[idx];
}
// Returns the index of the size bracket from the bracket size.