|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2012, PHP 5.4.0 RC5
- Core:
+ . Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax). (Dmitry)
. Fixed bug #60611 (Segmentation fault with Cls::{expr}() syntax). (Laruence)
- CLI SAPI:
--- /dev/null
+--TEST--
+Bug #60613 (Segmentation fault with $cls->{expr}() syntax)
+--FILE--
+<?php
+class Cls {
+ function __call($name, $arg) {
+ }
+}
+
+$cls = new Cls();
+$cls->{0}();
+$cls->{1.0}();
+$cls->{true}();
+$cls->{false}();
+$cls->{null}();
+echo "ok\n";
+--EXPECT--
+ok
+
} 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; \