Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2490803002: DBC: Fix bugs with array allocation (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | tests/language/vm/optimized_list_constructor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index a34d93badcfc3cb1d322075d0b73157e5d2c8550..9706eeeb644d59cb0638abacd3c886f84725d863 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -2838,7 +2838,7 @@ RawObject* Simulator::Call(const Code& code,
{
BYTECODE(CreateArrayOpt, A_B_C);
const intptr_t length = Smi::Value(RAW_CAST(Smi, FP[rB]));
- if (LIKELY(length <= Array::kMaxElements)) {
+ if (LIKELY(static_cast<uintptr_t>(length) <= Array::kMaxElements)) {
const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
const intptr_t instance_size =
(fixed_size + length*kWordSize) & ~(kObjectAlignment - 1);
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | tests/language/vm/optimized_list_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698