Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions extension/tests/xhprof_013.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
XHProf: PHP 5.6 crash in hp_execute_internal
Author: msonnabaum
--FILE--
<?php
xhprof_enable();
$test = array('test', 'test2');

array_pop($test);
echo "OK\n";
?>
--EXPECT--
OK
21 changes: 1 addition & 20 deletions extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,26 +1716,7 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data,
/* no old override to begin with. so invoke the builtin's implementation */

#if ZEND_EXTENSION_API_NO >= 220121212
/* PHP 5.5. This is just inlining a copy of execute_internal(). */

if (fci != NULL) {
((zend_internal_function *) execute_data->function_state.function)->handler(
fci->param_count,
*fci->retval_ptr_ptr,
fci->retval_ptr_ptr,
fci->object_ptr,
1 TSRMLS_CC);
} else {
zval **return_value_ptr = &EX_TMP_VAR(execute_data, execute_data->opline->result.var)->var.ptr;
((zend_internal_function *) execute_data->function_state.function)->handler(
execute_data->opline->extended_value,
*return_value_ptr,
(execute_data->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
? return_value_ptr
: NULL,
execute_data->object,
ret TSRMLS_CC);
}
execute_internal(execute_data, fci, ret TSRMLS_CC);
#elif ZEND_EXTENSION_API_NO >= 220100525
zend_op *opline = EX(opline);
temp_variable *retvar = &EX_T(opline->result.var);
Expand Down