hi,
Please review the path https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330
I hope, it should completely fix https://bugs.php.net/bug.php?id=72213
I'm going to commit this on Monday.
Thanks. Dmitry.
Please review the path
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L194-L196
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L356-L358
Why are you switching these around?
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L500-L501
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L511-L512
You should probably remove them instead of commenting them out.
And Nikita, does this fix my issues with trying to walk through the
possible paths and branches with Xdebug?
I hope, it should completely fix https://bugs.php.net/bug.php?id=72213
I'm going to commit this on Monday.
To which branches?
cheers,
Derick
hi,
Please review the path
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330I hope, it should completely fix https://bugs.php.net/bug.php?id=72213
I'm going to commit this on Monday.
Thanks. Dmitry.
USE_ZEND_ALLOC=0 valgrind sapi/cli/php Zend/tests/bug65784.php
gives me
==27339== Invalid read of size 8
==27339== at 0xB93F76: ZEND_CATCH_SPEC_CONST_CV_HANDLER
(zend_vm_execute.h:9362)
==27339== by 0xB7E872: execute_ex (zend_vm_execute.h:426)
==27339== by 0xB7EA74: zend_execute (zend_vm_execute.h:471)
==27339== by 0xB161EA: zend_execute_scripts (zend.c:1427)
==27339== by 0xA5319D: php_execute_script (main.c:2492)
==27339== by 0xC058D5: do_cli (php_cli.c:982)
==27339== by 0xC06D65: main (php_cli.c:1352)
==27339== Address 0xf5e0880 is 16 bytes inside a block of size 152 free'd
==27339== at 0x4C2BDEC: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27339== by 0xAD5B2C: _efree (zend_alloc.c:2423)
==27339== by 0xB6C4A6: zend_objects_store_del (zend_objects_API.c:187)
==27339== by 0xB10FF6: _zval_dtor_func (zend_variables.c:56)
==27339== by 0xB6445E: i_zval_ptr_dtor (zend_variables.h:48)
==27339== by 0xB64636: zend_object_std_dtor (zend_objects.c:68)
==27339== by 0xB6C38D: zend_objects_store_del (zend_objects_API.c:178)
==27339== by 0xB10FF6: _zval_dtor_func (zend_variables.c:56)
==27339== by 0xB7BF6E: i_free_compiled_variables (zend_execute.c:2101)
==27339== by 0xB7EABD: zend_leave_helper_SPEC (zend_vm_execute.h:481)
==27339== by 0xB83F83: ZEND_FAST_RET_SPEC_HANDLER
(zend_vm_execute.h:1894)
==27339== by 0xB7E872: execute_ex (zend_vm_execute.h:426)
and so on.
Nikita
hi,
Please review the path
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330I hope, it should completely fix https://bugs.php.net/bug.php?id=72213
I'm going to commit this on Monday.
Thanks. Dmitry.
From a quick look:
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L74
=> should this be orig_try_catch_offset?
https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330#file-bug72213-diff-L303
=> This assumes that either there's a catch block or a finally block to go
to. However, if we're in the catch block of a try/catch (without finally)
that may not be true.
Also, this still leaks one exception :(
<?php
function test() {
try {
throw new Exception(1);
} finally {
try {
throw new Exception(2);
} finally {
return 42;
}
}
}
test();
Nikita