Ask a Question related to PHP Bugs, Design and Development.
-
ndroege at bimp dot de #1
#40765 [NEW]: calling backtrace inside nested static class functions causes segfault
From: ndroege at bimp dot de
Operating system: linux debian
PHP version: 5.2.1
PHP Bug Type: Reproducible crash
Bug description: calling backtrace inside nested static class functions causes segfault
Description:
------------
Testet on 5.2.0 and 5.2.1
I was able to reproduce segfaults in this situation
on the commandline and with apache!
Reproduce code:
---------------
<?php
class CrashHelper
{
function call2($tpl_var, $value = null) {}
function call1($value = null) {}
}
class Crash
{
static function outerCall($param)
{
$ch = new CrashHelper();
# $test = Crash::innerCall($param);
# $ch->call2('test', $test); // don't crash
# $ch->call1(Crash::innerCall($param)); // don't crash
$ch->call2('test', Crash::innerCall($param)); // crash
}
static function innerCall($param)
{
$backtrace = debug_backtrace();
echo '<pre>'.var_export($backtrace, true).'</pre>';
}
}
function doCrash($param)
{
# $ch = new CrashHelper();
# $ch->call2('test', Crash::innerCall($param)); // don't crash
Crash::outerCall($param);
}
doCrash($_GET['id']);
?>
Expected result:
----------------
backtrace,
no crash
Actual result:
--------------
Speicherzugriffsfehler
--
Edit bug report at [url]http://bugs.php.net/?id=40765&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40765&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40765&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40765&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40765&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40765&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40765&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40765&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40765&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40765&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40765&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40765&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40765&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40765&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40765&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40765&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40765&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40765&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40765&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40765&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40765&r=mysqlcfg[/url]
ndroege at bimp dot de Guest
-
#39346 [NEW]: Unsetting a static variable inside a destructor causes segfault later on
From: daan at parse dot nl Operating system: Slackware 10.2 PHP version: 5.2.0RC5 PHP Bug Type: Reproducible crash Bug... -
#39177 [NEW]: Need mechanism to identifed calling class in static methods
From: acarheden at gmail dot com Operating system: Windows 2K3 Server PHP version: 5.1.6 PHP Bug Type: Feature/Change Request... -
#25652 [Opn->Ver]: Calling Global functions dynamically fails from Class scope
ID: 25652 Updated by: sniper@php.net Reported By: john@php.net -Status: Open +Status: Verified Bug... -
#25652 [Com]: Calling Global functions dynamically fails from Class scope
ID: 25652 Comment by: peter dot prochaska at datev dot de Reported By: john@php.net Status: Open Bug Type: ... -
Calling functions that are inside an included php file. Please Help
Why are you including a file using "http://localhost" . If your first script is running file using : <?include("selfedit.php");?> Then use it... -
nd0 at gmx dot de #2
#40765 [Opn]: calling backtrace inside nested static class functions causes segfault
ID: 40765
User updated by: nd0 at gmx dot de
-Reported By: ndroege at bimp dot de
+Reported By: nd0 at gmx dot de
Status: Open
Bug Type: Reproducible crash
Operating System: linux debian
PHP Version: 5.2.1
New Comment:
new email
Previous Comments:
------------------------------------------------------------------------
[2007-03-09 12:20:28] nd0 at gmx dot de
Description:
------------
Testet on 5.2.0 and 5.2.1
I was able to reproduce segfaults in this situation
on the commandline and with apache!
Reproduce code:
---------------
<?php
class CrashHelper
{
function call2($tpl_var, $value = null) {}
function call1($value = null) {}
}
class Crash
{
static function outerCall($param)
{
$ch = new CrashHelper();
# $test = Crash::innerCall($param);
# $ch->call2('test', $test); // don't crash
# $ch->call1(Crash::innerCall($param)); // don't crash
$ch->call2('test', Crash::innerCall($param)); // crash
}
static function innerCall($param)
{
$backtrace = debug_backtrace();
echo '<pre>'.var_export($backtrace, true).'</pre>';
}
}
function doCrash($param)
{
# $ch = new CrashHelper();
# $ch->call2('test', Crash::innerCall($param)); // don't crash
Crash::outerCall($param);
}
doCrash($_GET['id']);
?>
Expected result:
----------------
backtrace,
no crash
Actual result:
--------------
Speicherzugriffsfehler
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40765&edit=1[/url]
nd0 at gmx dot de Guest
-
tony2001@php.net #3
#40765 [Opn->Fbk]: calling backtrace inside nested static class functions causes segfault
ID: 40765
Updated by: [email]tony2001@php.net[/email]
Reported By: nd0 at gmx dot de
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: linux debian
PHP Version: 5.2.1
New Comment:
Cannot reproduce.
Please make sure you've disabled all zend_extensions like Zend
Optimizer, APC, Xdebug, ionCube etc.
Previous Comments:
------------------------------------------------------------------------
[2007-03-09 12:29:45] nd0 at gmx dot de
new email
------------------------------------------------------------------------
[2007-03-09 12:20:28] nd0 at gmx dot de
Description:
------------
Testet on 5.2.0 and 5.2.1
I was able to reproduce segfaults in this situation
on the commandline and with apache!
Reproduce code:
---------------
<?php
class CrashHelper
{
function call2($tpl_var, $value = null) {}
function call1($value = null) {}
}
class Crash
{
static function outerCall($param)
{
$ch = new CrashHelper();
# $test = Crash::innerCall($param);
# $ch->call2('test', $test); // don't crash
# $ch->call1(Crash::innerCall($param)); // don't crash
$ch->call2('test', Crash::innerCall($param)); // crash
}
static function innerCall($param)
{
$backtrace = debug_backtrace();
echo '<pre>'.var_export($backtrace, true).'</pre>';
}
}
function doCrash($param)
{
# $ch = new CrashHelper();
# $ch->call2('test', Crash::innerCall($param)); // don't crash
Crash::outerCall($param);
}
doCrash($_GET['id']);
?>
Expected result:
----------------
backtrace,
no crash
Actual result:
--------------
Speicherzugriffsfehler
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40765&edit=1[/url]
tony2001@php.net Guest
-
tony2001@php.net #4
#40765 [Fbk->Opn]: calling backtrace inside nested static class functions causes segfault
ID: 40765
Updated by: [email]tony2001@php.net[/email]
Reported By: nd0 at gmx dot de
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: linux debian
PHP Version: 5.2.1
New Comment:
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader. These extensions often modify engine
behavior which is not related to PHP itself.
Previous Comments:
------------------------------------------------------------------------
[2007-03-09 12:36:21] [email]tony2001@php.net[/email]
Cannot reproduce.
Please make sure you've disabled all zend_extensions like Zend
Optimizer, APC, Xdebug, ionCube etc.
------------------------------------------------------------------------
[2007-03-09 12:29:45] nd0 at gmx dot de
new email
------------------------------------------------------------------------
[2007-03-09 12:20:28] nd0 at gmx dot de
Description:
------------
Testet on 5.2.0 and 5.2.1
I was able to reproduce segfaults in this situation
on the commandline and with apache!
Reproduce code:
---------------
<?php
class CrashHelper
{
function call2($tpl_var, $value = null) {}
function call1($value = null) {}
}
class Crash
{
static function outerCall($param)
{
$ch = new CrashHelper();
# $test = Crash::innerCall($param);
# $ch->call2('test', $test); // don't crash
# $ch->call1(Crash::innerCall($param)); // don't crash
$ch->call2('test', Crash::innerCall($param)); // crash
}
static function innerCall($param)
{
$backtrace = debug_backtrace();
echo '<pre>'.var_export($backtrace, true).'</pre>';
}
}
function doCrash($param)
{
# $ch = new CrashHelper();
# $ch->call2('test', Crash::innerCall($param)); // don't crash
Crash::outerCall($param);
}
doCrash($_GET['id']);
?>
Expected result:
----------------
backtrace,
no crash
Actual result:
--------------
Speicherzugriffsfehler
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40765&edit=1[/url]
tony2001@php.net Guest
-
tony2001@php.net #5
#40765 [Opn->Bgs]: calling backtrace inside nested static class functions causes segfault
ID: 40765
Updated by: [email]tony2001@php.net[/email]
Reported By: nd0 at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: Reproducible crash
Operating System: linux debian
PHP Version: 5.2.1
New Comment:
..
Previous Comments:
------------------------------------------------------------------------
[2007-03-09 13:45:11] [email]tony2001@php.net[/email]
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader. These extensions often modify engine
behavior which is not related to PHP itself.
------------------------------------------------------------------------
[2007-03-09 12:36:21] [email]tony2001@php.net[/email]
Cannot reproduce.
Please make sure you've disabled all zend_extensions like Zend
Optimizer, APC, Xdebug, ionCube etc.
------------------------------------------------------------------------
[2007-03-09 12:29:45] nd0 at gmx dot de
new email
------------------------------------------------------------------------
[2007-03-09 12:20:28] nd0 at gmx dot de
Description:
------------
Testet on 5.2.0 and 5.2.1
I was able to reproduce segfaults in this situation
on the commandline and with apache!
Reproduce code:
---------------
<?php
class CrashHelper
{
function call2($tpl_var, $value = null) {}
function call1($value = null) {}
}
class Crash
{
static function outerCall($param)
{
$ch = new CrashHelper();
# $test = Crash::innerCall($param);
# $ch->call2('test', $test); // don't crash
# $ch->call1(Crash::innerCall($param)); // don't crash
$ch->call2('test', Crash::innerCall($param)); // crash
}
static function innerCall($param)
{
$backtrace = debug_backtrace();
echo '<pre>'.var_export($backtrace, true).'</pre>';
}
}
function doCrash($param)
{
# $ch = new CrashHelper();
# $ch->call2('test', Crash::innerCall($param)); // don't crash
Crash::outerCall($param);
}
doCrash($_GET['id']);
?>
Expected result:
----------------
backtrace,
no crash
Actual result:
--------------
Speicherzugriffsfehler
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40765&edit=1[/url]
tony2001@php.net Guest



Reply With Quote

