Skip to content

Conversation

andrewnester
Copy link
Contributor

}
if (zend_function_name != NULL) {
function_name = ZSTR_VAL(zend_function_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add in an

else {
    function_name = NULL;
}

here, to ensure that the function name is NULL if it does not exist (since currently, it could be any garbage). Without it, I get the following output (in debug mode):

#0  c1::() called at [/Users/tpunt/prog/php/tpuntphp/a.php:20]
#1  c1::go() called at [/Users/tpunt/prog/php/tpuntphp/a.php:24]

@tpunt
Copy link
Contributor

tpunt commented Jan 22, 2017

Other than not setting the function_name to NULL on failure, this patch LGTM.

@tpunt
Copy link
Contributor

tpunt commented Jan 22, 2017

Also (note to the merger), this patch belongs in the PHP 7.0 branch as well.

@krakjoe krakjoe added the Bug label Jan 22, 2017
@andrewnester andrewnester force-pushed the 73969-seg-fault-debug_backtrace branch from fc4d5c1 to 542a981 Compare January 22, 2017 16:00
@andrewnester
Copy link
Contributor Author

@tpunt thanks for comment! I updated PR according to this. @krakjoe I rebased PR to PHP-7.0 branch

@andrewnester andrewnester changed the base branch from PHP-7.1 to PHP-7.0 January 22, 2017 16:02
@krakjoe
Copy link
Member

krakjoe commented Jan 22, 2017

Merged 6f912f7

Thanks.

@krakjoe krakjoe closed this Jan 22, 2017
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