-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix GH-14687 segfault on debugging a freed SplObjectIterator instance. #14711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Another route which can be taken is to not display the glob node if this makes no sense in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems right but please check my comments
$s[$phar] = new HasDestructor(); | ||
register_shutdown_function(function() { | ||
global $s; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please close the test with ?>
, this is necessary so we can run the test directly.
ext/spl/tests/gh14687.phpt
Outdated
phar.readonly=0 | ||
--FILE-- | ||
<?php | ||
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're creating a file here, but have no clean section. Please add a clean section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it's better to just hardcode the filename to __DIR__ . '/gh14687.phar.zip'
because otherwise you can't use the same name in the clean section because the base name for the clean file contains the "clean" word.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
No description provided.