Bug #68165 [Asn->Wfx]: Loosing exception in try-throw-finally
| From: | laruence@php.net | Date: | Tue, 07 Oct 2014 02:39:36 +0000 |
| Subject: | Bug #68165 [Asn->Wfx]: Loosing exception in try-throw-finally | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187906@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68165&edit=1
ID: 68165
Updated by: laruence@php.net
Reported by: alexeydsov at gmail dot com
Summary: Loosing exception in try-throw-finally
-Status: Assigned
+Status: Wont fix
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu
PHP Version: 5.5.17
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
yes, this is one of them.
http://3v4l.org/n1bQE
the problem is because, after finally supporting was merged into 5.5. we did a refactor to it for
performance .. ...
and in the new impelmnetation, we need a extra field in EG to fix this issue, which will break ABI
compitiable , thus is not allowed to merge into 5.5
Previous Comments:
------------------------------------------------------------------------
[2014-10-06 19:03:05] nikic@php.net
There are a couple of finally issues that can't be fixed in PHP 5.5 due to ABI restrictions, I
don't know if this is one of them. Maybe Xinchen can tell...
------------------------------------------------------------------------
[2014-10-06 13:45:56] alexeydsov at gmail dot com
This bug makes unusable finally block for 5.5. Because any code theoretically can try and catch
exception somewhere inside.
------------------------------------------------------------------------
[2014-10-06 13:41:08] alexeydsov at gmail dot com
Description:
------------
If you throw Exception in try block and in finally block you throw and catch another exception than
you loose first exception outside the try/catch/finally block. This bug work in 5.5.17, not work in
5.6.
Test script:
---------------
try {
try {
echo "1\n";
throw new Exception("E1");
} finally {
try {
echo "2\n";
throw new Exception("E2");
} catch (\Exception $e) {
echo "3\n";
}
}
echo "4-\n";
} catch (\Exception $e) {
echo "4+".$e->getMessage()."\n";
}
echo "5\n";
Expected result:
----------------
1
2
3
4+E1
5
Actual result:
--------------
1
2
3
5
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68165&edit=1