summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-05-29 00:02:13 +0200
committerNikita Popov <nikic@php.net>2014-05-29 00:15:50 +0200
commitd9a35c7e97da5583c28d2799d64a6fccdf855622 (patch)
tree17050d9fe32b4180a1ffb891aea29f3cf4dd6bec /Zend/zend_operators.h
parentafd8a02160b4773a44f9898557e6eb0ec46f64fc (diff)
downloadphp-git-d9a35c7e97da5583c28d2799d64a6fccdf855622.tar.gz
Fix class constant fetching
If a class is extended after the constant fetch has been cached the cached value will be turned into a reference. On the next fetch the polymorphic cache will return this reference, which will be directly returned. The object assignment code then dereferences this result and performs a shallow copy, which is invalid for references. This subsequently leads to the constant value being prematurely freed. This is fixed by dereferencing the value returned from the polymorphic cache. Furthermore the incorrect dereference from in the object assignment code is replaced with an assertion that we're dealing with a non-reference, so ensure that this kind of problem cannot go unnoticed in the future.
Diffstat (limited to 'Zend/zend_operators.h')
0 files changed, 0 insertions, 0 deletions