Fix a few SEGVs relating to cyclic data with SETOP_BODY

Test cases inspired by zend test bug35239.phpt.  I think
there are other cases where SETOP_BODY should be SETOP_BODY_CELL, but
I looked at them mainly to see if they would crash, not if they were
optimal.  (Except I changed SetOpL which seemed to be doing tvToCell
twice for no reason.)

Differential Revision: D910025
Esse commit está contido em:
Jordan DeLong
2013-07-31 20:13:03 -07:00
commit de Sara Golemon
commit ae30d7480c
8 arquivos alterados com 116 adições e 12 exclusões
+3 -3
Ver Arquivo
@@ -4806,10 +4806,10 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSetOpL(PC& pc) {
DECODE_HA(local);
DECODE(unsigned char, op);
Cell* fr = m_stack.topC();
TypedValue* to = frame_local(m_fp, local);
SETOP_BODY(to, op, fr);
Cell* to = tvToCell(frame_local(m_fp, local));
SETOP_BODY_CELL(to, op, fr);
tvRefcountedDecRefCell(fr);
cellDup(*tvToCell(to), *fr);
cellDup(*to, *fr);
}
inline void OPTBLD_INLINE VMExecutionContext::iopSetOpN(PC& pc) {