Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 69810fdf5e52e4f1c0a9d0174e5082ef65af3f60..499da7e951ffcd5a408940279fece9938511a488 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -13465,6 +13465,11 @@ intptr_t ICData::GetCountAt(intptr_t index) const { |
const Array& data = Array::Handle(ic_data()); |
const intptr_t data_pos = |
index * TestEntryLength() + CountIndexFor(NumArgsTested()); |
+ if (data_pos < 0) { |
regis
2017/01/24 18:27:21
Can you explain with a comment how this is possibl
|
+ // Overflow. |
+ SetCountAt(index, 0); |
+ return 0; |
+ } |
return Smi::Value(Smi::RawCast(data.At(data_pos))); |
} |