Index: runtime/vm/flow_graph_compiler.cc |
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc |
index e4f461e6408809306ad2e8c3f59e579681dffaad..4e70de1d616c696562af6e04aa4a0eb8e800f947 100644 |
--- a/runtime/vm/flow_graph_compiler.cc |
+++ b/runtime/vm/flow_graph_compiler.cc |
@@ -845,12 +845,18 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs, |
// with the same instruction (and same location summary) sees a bitmap that |
// is larger that StackSize(). It will never be larger than StackSize() + |
// live_registers_size. |
- ASSERT(bitmap->Length() <= (spill_area_size + live_registers_size)); |
// The first safepoint will grow the bitmap to be the size of |
// spill_area_size but the second safepoint will truncate the bitmap and |
// append the live registers to it again. The bitmap produced by both calls |
// will be the same. |
+#if !defined(TARGET_ARCH_DBC) |
+ ASSERT(bitmap->Length() <= (spill_area_size + live_registers_size)); |
bitmap->SetLength(spill_area_size); |
+#else |
+ if (bitmap->Length() <= (spill_area_size + live_registers_size)) { |
+ bitmap->SetLength(Utils::Maximum(bitmap->Length(), spill_area_size)); |
+ } |
+#endif |
// Mark the bits in the stack map in the same order we push registers in |
// slow path code (see FlowGraphCompiler::SaveLiveRegisters). |