Re: Bug #3744: repeated eval("large string") causes crash

From: Date: Mon, 06 Mar 2000 17:18:46 +0000
Subject: Re: Bug #3744: repeated eval("large string") causes crash
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-16461@lists.php.net to get a copy of this message
This is a limitation of PHP 3 and won't be fixed as it is a problem with the architecture of PHP 3. This problem has been solved in PHP 4. Andi On 6 Mar 2000 piree@enneya.com wrote: > From: piree@enneya.com > Operating system: Windows, Linux > PHP version: 3.0.15 > PHP Bug Type: Reproduceable crash > Bug description: repeated eval("large string") causes crash > > Following script should reproduce the problem: > > <% > $b = ""; > for ($i = 1; $i < 10000; $i++) > $b .= "b"; > echo "b: $b\n"; > > for ($i = 1; $i < 10000; $i++) > { > echo "i: $i\n"; flush(); > eval("\$a = '$b';"); > } > %> > > This causes the PHP interpreter to crash on my Windows NT > machine (PHP 3.0.15). On the Linux machine of my > provider (PHP 3.0.14) it sometimes causes a crash > and sometimes causes message: "Unable to initialize a new token cache" > > I'm assuming the problem is related to the fact that > a new tokencache is create for each eval(), but the > tokencache is never destroyed after the eval() (at least, > I can't find a tc_destroy() call that would do that). > > p.s. note that above code is just a trick to reproduce > the problem. The real error occurs in my application > where evals are issued on some largestrings; > result: crash. > > > >

« previous php.dev (#16461) next »