From 53109b96f624e3472c2777dd9813bcfe15b0cd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Mart=C3=ADnez=20Novo?= Date: Sat, 31 Dec 2016 16:14:21 +0100 Subject: [PATCH] Fix segfault in xhprof_enable() Segfaults in PHP 5.6.1 (openSUSE 13.2) Fix based on https://gist.github.com/suside/6991247 PHP bug: https://bugs.php.net/bug.php?id=65345 --- extension/xhprof.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/xhprof.c b/extension/xhprof.c index 66aa041e..c41dd4af 100644 --- a/extension/xhprof.c +++ b/extension/xhprof.c @@ -1715,7 +1715,9 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, if (!_zend_execute_internal) { /* no old override to begin with. so invoke the builtin's implementation */ -#if ZEND_EXTENSION_API_NO >= 220121212 +#if ZEND_EXTENSION_API_NO >= 220131226 + execute_internal(execute_data, fci, ret TSRMLS_CC); +#elif ZEND_EXTENSION_API_NO >= 220121212 /* PHP 5.5. This is just inlining a copy of execute_internal(). */ if (fci != NULL) {