Index: runtime/vm/zone.h |
=================================================================== |
--- runtime/vm/zone.h (revision 42819) |
+++ runtime/vm/zone.h (working copy) |
@@ -118,7 +118,9 @@ |
template <class ElementType> |
void Free(ElementType* old_array, intptr_t len) { |
#ifdef DEBUG |
- memset(old_array, kZapUninitializedByte, len * sizeof(ElementType)); |
+ if (len > 0) { |
+ memset(old_array, kZapUninitializedByte, len * sizeof(ElementType)); |
+ } |
#endif |
} |