Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix for Bug #65345 Segfault in xhprof_enable() Only for php 5.5.* https://bugs.php.net/bug.php?id=65345
diff --git a/extension/xhprof.c b/extension/xhprof.c
index f553a35..7db4f00 100644
--- a/extension/xhprof.c
+++ b/extension/xhprof.c
@@ -1775,35 +1775,7 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data,
BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag);
}
- if (!_zend_execute_internal) {
- /* no old override to begin with. so invoke the builtin's implementation */
- zend_op *opline = EX(opline);
-
-#if ZEND_EXTENSION_API_NO >= 220100525
- temp_variable *retvar = &EX_T(opline->result.var);
- ((zend_internal_function *) EX(function_state).function)->handler(
- opline->extended_value,
- retvar->var.ptr,
- (EX(function_state).function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ?
- &retvar->var.ptr:NULL,
- EX(object), ret TSRMLS_CC);
-#else
- ((zend_internal_function *) EX(function_state).function)->handler(
- opline->extended_value,
- EX_T(opline->result.u.var).var.ptr,
- EX(function_state).function->common.return_reference ?
- &EX_T(opline->result.u.var).var.ptr:NULL,
- EX(object), ret TSRMLS_CC);
-
-#endif
- } else {
- /* call the old override */
-#if PHP_VERSION_ID < 50500
- _zend_execute_internal(execute_data, ret TSRMLS_CC);
-#else
- _zend_execute_internal(execute_data, fci, ret TSRMLS_CC);
-#endif
- }
+ execute_internal(execute_data, fci, ret TSRMLS_CC);
if (func) {
if (hp_globals.entries) {
@iworker

This comment has been minimized.

Copy link

iworker commented Jul 18, 2014

Is it really helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.