diff options
Diffstat (limited to 'Zend/tests/live_range_phi_leak.phpt')
-rw-r--r-- | Zend/tests/live_range_phi_leak.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/live_range_phi_leak.phpt b/Zend/tests/live_range_phi_leak.phpt new file mode 100644 index 0000000000..f072584053 --- /dev/null +++ b/Zend/tests/live_range_phi_leak.phpt @@ -0,0 +1,19 @@ +--TEST-- +Missing live range if part of phi +--FILE-- +<?php +function doThrow() { + throw new Exception("Test"); +} +function test($k) { + // The 0 gives the QM_ASSIGN a non-refcounted type. + $res[$k ? $k : 0] = doThrow(); +} +try { + test(new stdClass); +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} +?> +--EXPECT-- +Test |