summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2011-12-28 09:59:39 +0000
committerDmitry Stogov <dmitry@php.net>2011-12-28 09:59:39 +0000
commita68e858d6908f8dc3f88a409d4a9740330ad219f (patch)
tree5e9b5360f5418dd732e283260d202895ef1e725f /Zend/zend_compile.c
parent39a973a0c516a12ce6cbf84955421b450f6b7b1c (diff)
downloadphp-git-a68e858d6908f8dc3f88a409d4a9740330ad219f.tar.gz
Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax)
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c4e9291065..85d17f0d91 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -89,7 +89,8 @@
} while (0)
#define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \
- if (CG(active_op_array)->literals[literal].cache_slot == \
+ if (CG(active_op_array)->literals[literal].cache_slot != -1 && \
+ CG(active_op_array)->literals[literal].cache_slot == \
CG(active_op_array)->last_cache_slot - POLYMORPHIC_CACHE_SLOT_SIZE) { \
CG(active_op_array)->literals[literal].cache_slot = -1; \
CG(active_op_array)->last_cache_slot -= POLYMORPHIC_CACHE_SLOT_SIZE; \