Skip to content

Commit

Permalink
Merge phacility#32 to fix PHP 5.5 segfault. See also, https://bugs.ph…
Browse files Browse the repository at this point in the history
…p.net/bug.php?id=65345.

Stop using this when the issue is fixed in a PECL release.
  • Loading branch information
glennpratt committed Jan 24, 2014
2 parents ec8b884 + a2564e2 commit 6e6e7f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,9 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data,
}

if (!_zend_execute_internal) {
#if PHP_VERSION_ID >= 50500
if (fci == NULL) {
#endif
/* no old override to begin with. so invoke the builtin's implementation */
zend_op *opline = EX(opline);
#if ZEND_EXTENSION_API_NO >= 220100525
Expand All @@ -1719,6 +1722,15 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data,
EX(function_state).function->common.return_reference ?
&EX_T(opline->result.u.var).var.ptr:NULL,
EX(object), ret TSRMLS_CC);
#endif
#if PHP_VERSION_ID >= 50500
} else {
((zend_internal_function *) EX(function_state).function)->handler(
fci->param_count,
*fci->retval_ptr_ptr,
fci->retval_ptr_ptr,
fci->object_ptr, ret TSRMLS_CC);
}
#endif
} else {
/* call the old override */
Expand Down

0 comments on commit 6e6e7f3

Please sign in to comment.