Fix leak when FPushCufArray throws
commit0dd7ba019cda7d704c1b37dc8863ba06f1abe3da
authormwilliams <mwilliams@fb.com>
Wed, 2 Apr 2014 22:14:27 +0000 (2 15:14 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 4 Apr 2014 17:04:26 +0000 (4 10:04 -0700)
treedb24fd13ae0a18df84561ca230ac41228e5cdacf
parent7808cb7735e0e87995b5cfea1a4a6a6f2bfd3c61
Fix leak when FPushCufArray throws

The object got written to the stack by the c++ helper,
but the catch trace also wrote the callable to the same stack slot.
This changes the c++ helper to write the object to the Cell with the
highest address in the ActRec, instead of the lowest, and also to make
the marker and the SyncPoint agree on where the stack is supposed to
be.

Reviewed By: @jdelong

Differential Revision: D1255189
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/hhbc-translator.h
hphp/runtime/vm/jit/translator-runtime.h
hphp/test/slow/exceptions/cuf_throw.php [new file with mode: 0644]
hphp/test/slow/exceptions/cuf_throw.php.expect [new file with mode: 0644]