Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index c0b4657b6c53db3d81765598a5912c3b807d095e..1571d62b25f1da38a450d6b10f5a56173ecedf49 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -2112,6 +2112,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); |
} |