php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5478 access violation using variable aliases in classes
Submitted: 2000-07-09 06:06 UTC Modified: 2000-10-02 22:20 UTC
From: avarney at mediatec-online dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (09/07/2000) OS: WinDoze NT4.0
Private report: No CVE-ID: None
 [2000-07-09 06:06 UTC] avarney at mediatec-online dot de
Hi,

here is a little piece of code that will crash php. Of course I know that this is because
I remove the object itself, but I guess, PHP is supposed to keep running anyway!?
I used PHP4.0.1PL2 on windows NT4.0 to do this. Would you like this sort of stuff to be reported as an error? Will you be able to fix it?

Regards,
Andr?

<?
// Crude piece of code to show a way to make PHP run into an
// access violation. (C) 20000708 by Andre Varney (avarney@mediatec-online.de)
Class MONSTER {
   function MONSTER() {
      $GLOBALS["xalias"] = &$this;
   }

   function kill() {
      unset($GLOBALS["xalias"]);
   }
}

$x=new MONSTER;
$xalias->kill();

print "that's it";

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 21:43 UTC] zak@php.net
Verified. Despite being incorrect usage, it not should cause an access violation.
 [2000-09-04 22:31 UTC] sniper@php.net
So is this only a windoze problem ? I can not reproduce
this within Linux using latest CVS of php4.

--Jani
 [2000-09-06 17:18 UTC] sniper@php.net
User feedback:
-----------
By the time, that I reported the bug, it affected both, Linux and Windows.
Unfortunately, I didn't manage to check this with the latest CVS yet.

Andr?


----------

Please report back when you have checked it.

--Jani
 [2000-10-02 22:20 UTC] sniper@php.net
No feedback.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC