diff --git a/hphp/runtime/vm/bytecode.cpp b/hphp/runtime/vm/bytecode.cpp index 7d230feb6..7a281abdf 100644 --- a/hphp/runtime/vm/bytecode.cpp +++ b/hphp/runtime/vm/bytecode.cpp @@ -5900,6 +5900,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtorD(PC& pc) { } inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) { + PC origPc = pc; NEXT(); DECODE_IA(itId); DECODE(Offset, offset); @@ -5922,7 +5923,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) { false); if (f == nullptr) { - pc += offset; + pc = origPc + offset; } else { cit.setFunc(f); if (obj) { diff --git a/hphp/test/slow/array_functions/bad_array_filter.php b/hphp/test/slow/array_functions/bad_array_filter.php new file mode 100644 index 000000000..edf7b2d2e --- /dev/null +++ b/hphp/test/slow/array_functions/bad_array_filter.php @@ -0,0 +1,4 @@ +