Re: probably the var_dump()'s problem is in its roots.
| From: | Andrey Hristov | Date: | Thu, 14 Mar 2002 10:00:41 +0000 |
| Subject: | Re: probably the var_dump()'s problem is in its roots. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-81192@lists.php.net to get a copy of this message | ||
Update....changing to E_WARNING will be an error. Neverending recursion.
Andrey Hristov
----- Original Message -----
From: "Andrey Hristov" <ahristov@icygen.com>
To: <php-dev@lists.php.net>
Sent: Thursday, March 14, 2002 11:55 AM
Subject: [PHP-DEV] probably the var_dump()'s problem is in its roots.
> Hi
> After looking at the source for possible fix for the var_dump()'s crash (fixed few minutes
> by Yasuo) I realized that it may be
> possible to change HASH_PROTECT_RECURSION macro and instead of
> if ((ht)->nApplyCount++ >= 3)
>
> to change to
> if ((ht)->nApplyCount++ >= 1)
>
>
> Ok. The var_dump() is fixed but I think that there are maybe other places where this problem
> can take place. ...and I've just
tried
> that :
> <?php
> $other = &$GLOBALS;
> if ($other ==$GLOBALS) echo "Success";
> ?>
> and I php crashed with :
>
> Fatal error: Nesting level too deep - recursive dependency? in c:\apache\htdocs\ad.php on line
> 3
>
> So, the problem can occur in :
> 1)zend_hash_apply()
> 2)zend_hash_apply_with_argument()
> 3)zend_hash_apply_with_arguments()
> 4)zend_hash_reverse_apply()
> 5)zend_hash_compare() - my example uses this
>
> The easy fix is to change from E_ERROR to E_WARNING and to lower 3 to 1. I'm not sure what
> will be the BC impact of these changes.
> May be the problem is deeper and has to be investigated.
>
> Best regards,
> Andrey Hristov
>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>