RE: [PHP-DEV] strange crash
| From: | derick@php.net | Date: | Wed, 21 Nov 2001 08:01:40 +0000 |
| Subject: | RE: [PHP-DEV] strange crash | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71180@lists.php.net to get a copy of this message | ||
Hello,
I'll have a look,
Derick
On Wed, 21 Nov 2001, Chris Newbill wrote:
> Bingo!
>
> What is happening is I have PHP code that will eventually be pulled from
> a database, and some of them need to import the global scope (although I
> have changed this for security reasons). Only way to do this (easily)
> when eval'ing code is with extract($GLOBALS) or know which variables I
> want and pull them in one at a time. Well for prototyping the code is
> included in the file instead of being pulled from the DB.
>
> Here is the minimum script that will crash for me. Funny this used to
> work, I tried it as an experiment and when it worked I proceeded as if
> it would always work.
>
> <?php
>
> extract($GLOBALS);
>
> ?>
>
> Guess extract() doesn't like the recursion of $GLOBALS??
>
> -Chris
>
> -----Original Message-----
> From: Derick Rethans [mailto:derick@php.net]
> Sent: Wednesday, November 21, 2001 12:30 AM
> To: Chris Newbill
> Cc: php-dev@lists.php.net
> Subject: Re: [PHP-DEV] strange crash
>
> On Wed, 21 Nov 2001, Chris Newbill wrote:
>
> > ---------------------------------------
> > array.c(1263) : Block 0x08217420 status:
> > Beginning: OK (allocated on array.c:1218, 9 bytes)
> > End: Overflown (magic=0x2A8FCC01 instead of 0x2A8FCC84)
> > 1 byte(s) overflown
> > ---------------------------------------
> > array.c(1218) : Freeing 0x08217444 (9 bytes),
> > script=/www/erain/st2/commercesys/html/discount_detail.php
> >
> > Ideas? This happens with today's CVS and 4.1.0RC3.
> >
> > I haven't broken the script down to something small enough to
> > reproduce..yet.
>
> My guess is that it has something to do with the extract() function.
>
> regards,
>
> Derick Rethans
>
> ---------------------------------------------------------------------
> PHP: Scripting the Web - www.php.net - derick@php.net
> SRM: Site Resource Manager - www.vl-srm.net
> ---------------------------------------------------------------------
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>