Chromium Code Reviews| Index: runtime/vm/growable_array.h |
| diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h |
| index b2d03e08bf4fedf2d2cc5733a4743f0a89f45c48..442b2550622a56be685538841c1e3569e1d1eea0 100644 |
| --- a/runtime/vm/growable_array.h |
| +++ b/runtime/vm/growable_array.h |
| @@ -38,7 +38,8 @@ class BaseGrowableArray : public B { |
| bool is_empty() const { return length_ == 0; } |
| void TruncateTo(intptr_t length) { |
| - ASSERT(length_ >= length); |
| + ASSERT(length >= 0); |
| + ASSERT(static_cast<uintptr_t>(length_) >= static_cast<uintptr_t>(length)); |
|
bkonyi
2017/01/19 20:48:46
The compiler was complaining that doing length_ >=
zra
2017/01/19 21:06:25
I think it's not worried about overflow here, but
bkonyi
2017/01/20 23:56:28
See comment in new patch in kernel_binary.
|
| length_ = length; |
| } |