php-src/Zend/tests/bug74084.phpt

38 lines
654 B
PHP

--TEST--
Bug #74084 (Out of bound read - zend_mm_alloc_small)
--INI--
error_reporting=0
--FILE--
<?php
$$A += $$B['a'] = &$$C;
unset($$A);
try {
$$A -= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A *= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A /= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A **= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Unsupported operand types
Unsupported operand types
Unsupported operand types
Unsupported operand types