This fixes a number of infinite loops in the Symfony testsuite. It
took an obscene amount of time to track this down :/
ZEND_API int increment_function(zval *op1) /* {{{ */
{
+try_again:
switch (Z_TYPE_P(op1)) {
case IS_LONG:
if (Z_LVAL_P(op1) == LONG_MAX) {
return res;
}
return FAILURE;
+ case IS_REFERENCE:
+ op1 = Z_REFVAL_P(op1);
+ goto try_again;
default:
return FAILURE;
}
long lval;
double dval;
+try_again:
switch (Z_TYPE_P(op1)) {
case IS_LONG:
if (Z_LVAL_P(op1) == LONG_MIN) {
return res;
}
return FAILURE;
+ case IS_REFERENCE:
+ op1 = Z_REFVAL_P(op1);
+ goto try_again;
default:
return FAILURE;
}