Skip to content

Fix null static_variable_ptr for uncalled fake closures #8109

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

Closed
wants to merge 1 commit into from

Conversation

iluuu1994
Copy link
Member

Closes GH-8083

This is already fixed on master.

} else if (func->op_array.static_variables) {
HashTable *ht = ZEND_MAP_PTR_GET(func->op_array.static_variables_ptr);
if (!ht) {
ht = zend_array_dup(func->op_array.static_variables);
ZEND_MAP_PTR_SET(func->op_array.static_variables_ptr, ht);
}
ZEND_MAP_PTR_INIT(closure->func.op_array.static_variables_ptr, ht);
}

@dstogov I'm unsure if this fix is correct. Can you check? You made changes to map_ptr in the same commit (ddaf64b). I don't understand the details of how this works.

@cmb69 cmb69 linked an issue Feb 17, 2022 that may be closed by this pull request
@dstogov dstogov closed this Feb 18, 2022
Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right.

@iluuu1994 iluuu1994 deleted the gh-8083 branch February 18, 2022 15:41
@iluuu1994 iluuu1994 restored the gh-8083 branch February 18, 2022 16:11
@iluuu1994 iluuu1994 reopened this Feb 18, 2022
@iluuu1994 iluuu1994 closed this in 19063a8 Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault getting debug info from a Closure containing a static variable
2 participants