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

From: Date: Mon, 06 Mar 2000 16:51:32 +0000
Subject: Bug #3744: repeated eval("large string") causes crash
Groups: php.dev 
Request: Send a blank email to php-dev+get-16458@lists.php.net to get a copy of this message
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 (#16458) next »