php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
46 + 2 = ?
Subscribe to this entry?

 
 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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: Fri Apr 26 01:01:30 2024 UTC