-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-17408: Assertion failure Zend/zend_exceptions.c
`zend_test_create_throwing_resource` sets the exception in the `test` call frame and unwinds to `main`. It then throws for the `resource` variable and verifies that the exception opline is set. However, it wasn't set in `main`, it was set at the `test` call frame and rethrown later. The assertion is too conservative, but the end result is right, so drop the assertion. Closes GH-17533. Co-authored-by: Ilija Tovilo <[email protected]>
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
GH-17408 (Assertion failure Zend/zend_exceptions.c) | ||
--EXTENSIONS-- | ||
zend_test | ||
--FILE-- | ||
<?php | ||
function test() { | ||
$resource = zend_test_create_throwing_resource(); | ||
zend_test_create_throwing_resource(); | ||
} | ||
test(); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught Exception: Throwing resource destructor called in %s:%d | ||
Stack trace: | ||
#0 %s(%d): test() | ||
#1 {main} | ||
|
||
Next Exception: Throwing resource destructor called in %s:%d | ||
Stack trace: | ||
#0 {main} | ||
thrown in %s on line %d |