ID:               26697
 Updated by:       [EMAIL PROTECTED]
 Reported By:      arjen at glas dot its dot tudelft dot nl
-Status:           Open
+Status:           Closed
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5.0.0b3
 Assigned To:      helly
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2003-12-22 18:50:01] davidc at blesys dot com

What happens, I think, is that __autoload starts recursing endlessly.
Do this:

$autotracker=false;
  function __autoload ($n) {
global $autotracker; $n=strtolower($n);
 if ($autotracker==$n)die("Attempting to autoload $n again"); 
$autotracker=$n;
....//rest of function __autoload


}//end __autoload
Probably a bug, but rather easy to fix by the client programmer. I
think the bug I found today w/ thrown exceptions is much more dangerous
(http://bugs.php.net/bug.php?id=26698) because you can't really fix it
for all cases.

------------------------------------------------------------------------

[2003-12-22 16:03:57] arjen at glas dot its dot tudelft dot nl

Description:
------------
When calling class_exists on a nonexistent classname in __autoload,
you'll get a segfault.

This is in beta1, beta2 and beta3 (and now I had the time to create a
testcase and do a report). Which ran under apache2 (2.0.48) on gentoo
linux.

And then I saw this report:
http://bugs.php.net/bug.php?id=26630&edit=2
So I downloaded the php5-200312222030 snapshot and there it also
segfaults...



Reproduce code:
---------------
<?
function __autoload($classname)
{
    if(!class_exists('test'))
    {
        echo "This won't be reached due to a segfault";
    }
}

$test = new test();

?>



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26697&edit=1

Reply via email to