On Fri, Aug 3, 2012 at 3:08 PM, Leigh <lei...@gmail.com> wrote:
> Hi all,
>
> Can anyone explain to me the reason that when a function or class is
> disabled via the ini setting, an attempt to access the disabled item
> generates a non-fatal error?
>
> I'm looking at a segfault in the SPL caused by the blind creation of a
> class, which seems to only fail when the class is disabled. I'm
> wondering in how many other places this could occur.
>
> The obvious solution is to be more careful and check return values,
> but a FATAL would also have prevented execution continuing.
>
> Thanks,
>
> Leigh.
Hi:

this is a very badly bug.

but I think it's not a spl issues, we should change the behavior of
zend_disable_class,

since for now, it will delete the class entry, which will make the class entry
pointer (preserved by extension) become a wild pointer..

dereference it is a undefined behavior, in this sense, segfault is lucky.

thanks
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to