-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Do not delete main chunk in zend_gc #18756
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--TEST-- | ||
Bug GH-18756: Zend MM may delete the main chunk | ||
--FILE-- | ||
<?php | ||
|
||
zend_test_gh18756(); | ||
|
||
?> | ||
==DONE== | ||
--EXPECT-- | ||
==DONE== |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1516,3 +1516,11 @@ static PHP_FUNCTION(zend_test_create_throwing_resource) | |
zend_resource *res = zend_register_resource(NULL, le_throwing_resource); | ||
ZVAL_RES(return_value, res); | ||
} | ||
|
||
PHP_FUNCTION(zend_test_gh18756) | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need ZEND_PARSE_PARAMETERS_NONE(); for the arginfo/zpp check. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed (that's my mistake, not @danog's, I did push this test) |
||
zend_mm_heap *heap = zend_mm_startup(); | ||
zend_mm_gc(heap); | ||
zend_mm_gc(heap); | ||
zend_mm_shutdown(heap, true, false); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Should be in
ext/zend_test
and a--EXTENSION--
section forzend_test
.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.
Indeed, my bad.
Are you sure? I see
ext/zend_test
as a set of APIs for testing underlying mechanisms that are outside ofext/zend_test
. Tests inext/zend_test/tests
would be for testingzend_test
itself.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.
No. What you say makes sense, boundaries are probably a little muddy 😃