diff --git a/hphp/runtime/vm/jit/linearscan.cpp b/hphp/runtime/vm/jit/linearscan.cpp index 0763eb24d..dc20fc240 100644 --- a/hphp/runtime/vm/jit/linearscan.cpp +++ b/hphp/runtime/vm/jit/linearscan.cpp @@ -1191,7 +1191,7 @@ void LinearScan::allocRegsOneTrace(BlockList::iterator& blockIt, assert(!spill->block()->trace()->isMain()); spill = spill->clone(m_irFactory); } - block->trace()->front()->prepend(spill); + trace->front()->prepend(spill); } else if (inst->isBlockEnd()) { block->next()->prepend(spill); } else { diff --git a/hphp/test/slow/compilation/exitspill.php b/hphp/test/slow/compilation/exitspill.php new file mode 100644 index 000000000..19e3b567c --- /dev/null +++ b/hphp/test/slow/compilation/exitspill.php @@ -0,0 +1,28 @@ + + int(1) + [1]=> + int(32) + [2]=> + int(32) + [3]=> + int(32) + [4]=> + int(32) + [5]=> + int(32) +}