php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22361 Endless loop causes windows to reboot
Submitted: 2003-02-21 13:50 UTC Modified: 2003-02-22 14:18 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: max at tvattomaten dot com Assigned:
Status: Wont fix Package: Class/Object related
PHP Version: 4.3.1 OS: windows xp, sp1
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:
17 + 12 = ?
Subscribe to this entry?

 
 [2003-02-21 13:50 UTC] max at tvattomaten dot com
Hi!

I've noticed that this buggy code causes a windows xp crash and reboot:

*******
class A {
 var Object;
 function A(){
  $this->Object = new B();
 }
}

class B {
 var Object;

 function B(){
  $this->Object = new A();
 }
}

****
and then running:

$myObject = new B();

***********************

I figure that first of all this should not result in that windows reboots. Second I wouldn't mind if with the notices turned on it should report a notice for this error (I can't be the only one that's done this). At least there should be such a check for the constructor since it seems that I can't learn from my previous mistakes :-D

Thanks for great software!

//Max Gordon

PS. I'm running latest version of apache 2 DS

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-21 14:54 UTC] php at codewhore dot org
Check your hardware for stability. PHP cannot possibly cause windows to reboot without either a major kernel bug in windows or faulty hardware.
 [2003-02-22 05:24 UTC] max at tvattomaten dot com
I've been thinking about reinstalling win xp for some time now but I hate reinstalling all my software and reconfiguring. I know that there is something fishy with my xp but this is the only time it actually reboots. That's why I still think it may be an issue that may be interesting to fix.
 [2003-02-22 14:18 UTC] iliaa@php.net
What happens is a stack overflow due to an unterminated loop. PHP has no internal stack protection so it crashes. As to why windows crashes & reboots that's already an MS bug and not a PHP problem. 
In a properly working OS, this would only result in a PHP crash.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC