php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62265 crash with static member followed by 2+ non-static members
Submitted: 2012-06-08 15:55 UTC Modified: 2012-06-10 16:07 UTC
From: lomo74 at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.4.3 OS: Windows 7
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: lomo74 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-06-08 15:55 UTC] lomo74 at gmail dot com
Description:
------------
using IIS + FastCGI PHP 5.4.3 on a Win7 machine.
declaring a class that contains a static var followed by two or more non-static vars, the engine crashes when you try to instantiate the class.
my Linux machine (Apache + PHP 5.4.3) is not affected by this issue.

Test script:
---------------
<?php
class MYTest1 {
	static $data;
}
class MYTest2 {
	static $data;
	var $a;
}
class MYTest3 {
	static $data;
	var $a;
	var $b;
}
$obj = new MYTest1(); //ok
$obj = new MYTest2(); //ok
//the following crashes PHP
$obj = new MYTest3();
echo "Still alive."; //won't print
?>


Expected result:
----------------
the string "Still alive."

Actual result:
--------------
no output at all.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-08 17:17 UTC] lomo74 at gmail dot com
-Operating System: Windows +Operating System: Windows 7
 [2012-06-08 17:17 UTC] lomo74 at gmail dot com
just tested on a Windows 2003 machine + IIS + PHP FastCGI 5.4.3, it is not affected.
will test on another Windows 7 machine ASAP.
 [2012-06-08 23:24 UTC] nikic@php.net
Could you check whether the issue also exists when running PHP from the commandline (cli)? This way one could exclude the IIS and FastCGI parts of the chain.
 [2012-06-10 16:02 UTC] lomo74 at gmail dot com
I apologize. I further tracked down the problem and it seems it is due to XDebug: http://bugs.xdebug.org/view.php?id=824
If noone has objections, I'm closing this report --
 [2012-06-10 16:07 UTC] felipe@php.net
Thanks.
 [2012-06-10 16:07 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC