|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3744 repeated eval("large string") causes crash
Submitted: 2000-03-06 11:51 UTC Modified: 2005-03-31 16:13 UTC
From: piree at enneya dot com Assigned:
Status: Wont fix Package: Reproducible Crash
PHP Version: 3.0.15 OS: Windows, Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2000-03-06 11:51 UTC] piree at enneya dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 16:01:32 2024 UTC