FAQ
Thanks for review.

Both problems should be fixed now https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330

Do you see any other problems or a better way to fix this?


Thanks. Dmitry.

________________________________
From: Nikita Popov <nikita.ppv@gmail.com>
Sent: Friday, May 20, 2016 4:54:07 PM
To: Dmitry Stogov
Cc: Xinchen Hui; internals
Subject: Re: "finally" handling refactoring (Bug #72213)

On Fri, May 20, 2016 at 2:07 PM, Dmitry Stogov wrote:

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.

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 9 | next ›
Discussion Overview
groupphp-internals @
categoriesphp
postedMay 20, '16 at 12:07p
activeMay 24, '16 at 7:46a
posts9
users3
websitephp.net

People

Translate

site design / logo © 2018 Grokbase