Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 6f2f8d62b844e37a0a79fed94524de5fdb01efd4..19415975e2d6db65eb9f481633994234b9246e22 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -2168,6 +2168,9 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. |
+ if (spill_index > LUnallocated::kMaxFixedIndex) { |
+ Abort("Too many spill slots needed for OSR"); |
+ } |
return DefineAsSpilled(new LUnknownOSRValue, spill_index); |
} |