From 35437f92b50184af0cb6b6dcdabb1f517729a669 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 3 Dec 2014 14:00:12 +0100 Subject: php-pecl-xdebug: more upstream patch, thanks Derick --- php-pecl-xdebug.spec | 5 ++++- xdebug-upstream.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec index 2d314ae..ab4adb5 100644 --- a/php-pecl-xdebug.spec +++ b/php-pecl-xdebug.spec @@ -30,7 +30,7 @@ Name: %{?scl_prefix}php-pecl-xdebug Summary: PECL package for debugging PHP scripts Version: 2.2.6 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} %if 0%{?gitver:1} Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{commit}/%{pecl_name}-%{version}-%{gitver}.tar.gz %else @@ -259,6 +259,9 @@ rm -rf %{buildroot} %changelog +* Wed Dec 3 2014 Remi Collet - 2.2.6-3 +- more upstream patch + * Wed Dec 3 2014 Remi Collet - 2.2.6-2 - add upstream patch for couchbase compatibility see http://bugs.xdebug.org/view.php?id=1087 diff --git a/xdebug-upstream.patch b/xdebug-upstream.patch index aa26c76..f319af3 100644 --- a/xdebug-upstream.patch +++ b/xdebug-upstream.patch @@ -46,3 +46,44 @@ index 1b3517c..b8c9d5a 100644 xdebug_llist_init(&xg->server, xdebug_superglobals_dump_dtor); xdebug_llist_init(&xg->get, xdebug_superglobals_dump_dtor); +From 693cfae8345fd1554a15a933c5aaa26e5c70cb93 Mon Sep 17 00:00:00 2001 +From: Derick Rethans +Date: Wed, 3 Dec 2014 12:36:10 +0000 +Subject: [PATCH] Running scripts in RINIT is really not a good idea guys! + +--- + xdebug.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/xdebug.c b/xdebug.c +index 3c1340c..8867507 100644 +--- a/xdebug.c ++++ b/xdebug.c +@@ -316,6 +316,18 @@ static void php_xdebug_init_globals (zend_xdebug_globals *xg TSRMLS_DC) + xg->in_at = 0; + xg->active_execute_data = NULL; + xg->active_op_array = NULL; ++ xg->no_exec = 0; ++ xg->context.program_name = NULL; ++ xg->context.list.last_file = NULL; ++ xg->context.list.last_line = 0; ++ xg->context.do_break = 0; ++ xg->context.do_step = 0; ++ xg->context.do_next = 0; ++ xg->context.do_finish = 0; ++ xg->in_execution = 0; ++ xg->remote_enabled = 0; ++ xg->breakpoints_allowed = 0; ++ xg->profiler_enabled = 0; + + xdebug_llist_init(&xg->server, xdebug_superglobals_dump_dtor); + xdebug_llist_init(&xg->get, xdebug_superglobals_dump_dtor); +@@ -1392,7 +1404,7 @@ void xdebug_execute_ex(zend_execute_data *execute_data TSRMLS_DC) + #endif + fse->This = EG(This); + +- if (XG(remote_enabled) || XG(collect_vars) || XG(show_local_vars)) { ++ if (XG(stack) && (XG(remote_enabled) || XG(collect_vars) || XG(show_local_vars))) { + /* Because include/require is treated as a stack level, we have to add used + * variables in include/required files to all the stack levels above, until + * we hit a function or the top level stack. This is so that the variables -- cgit