Skip to content

Fix zend_fetch_debug_backtrace() when EG(current_execute_data) == NULL.#1482

Closed
LawnGnome wants to merge 1 commit intophp:masterfrom
LawnGnome:zend_fetch_debug_backtrace
Closed

Fix zend_fetch_debug_backtrace() when EG(current_execute_data) == NULL.#1482
LawnGnome wants to merge 1 commit intophp:masterfrom
LawnGnome:zend_fetch_debug_backtrace

Conversation

@LawnGnome
Copy link
Contributor

This is a regression from PHP 5, which never attempted to dereference fields in the execute data without first checking if it was NULL.

This is a regression from PHP 5, which never attempted to dereference fields in
the execute data without first checking if it was NULL.
@laruence
Copy link
Member

is there a way to trigger the null pointer dereference? I mean a phpt :)

@LawnGnome
Copy link
Contributor Author

@laruence I wasn't able to come up with one easily — this was something I hit while working on an extension, rather than in PHP code. If you have any ideas, I'm happy to experiment!

@laruence
Copy link
Member

Just for the record, this is what I commented on bugs.php.net:

Not sure about that, if there is no active_execute_data, then it must not be in execution..
then maybe this fucntion should not be called at all

however, add a protection in such a not-common used function, seems is also okey. :)

@smalyshev smalyshev added the Bug label Sep 28, 2015
@laruence
Copy link
Member

laruence commented Nov 9, 2015

A fix has been committed in d70aa14 thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants