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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: piree at enneya dot com
New email:
PHP Version: OS:

 

 [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 19:01:29 2024 UTC