summaryrefslogtreecommitdiffstats
path: root/xdebug-pr178.patch
blob: 237ade0b607adfd09e78c3ddd58630e07174340b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 1958b346aea595a67d15978f9a38d413c4147e8e Mon Sep 17 00:00:00 2001
From: Derick Rethans <github@derickrethans.nl>
Date: Fri, 29 May 2015 13:20:53 +0100
Subject: [PATCH] Fixed issue #1151: Crash when another extension calls
 call_user_function() during RINIT

---
 xdebug_stack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xdebug_stack.c b/xdebug_stack.c
index 2c7d94e..4be99d2 100644
--- a/xdebug_stack.c
+++ b/xdebug_stack.c
@@ -993,6 +993,7 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
 	/* Call user function locations */
 	if (
 		!tmp->filename &&
+		XG(stack) &&
 		XDEBUG_LLIST_TAIL(XG(stack)) &&
 		XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack))) &&
 		((function_stack_entry*) XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack))))->filename