From: rik at c-ict dot com
Operating system: At least Linux
PHP version: 5.4.4
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault in DateInterval class when extended
Description:
------------
Hello,
I found a way to reproduce a segfault on at least linux but possibly on
other OS'es as wel.
It is very simple to reproduce:
1 overload the DateInterval in a new class.
2 overload the constructor
3 use one of the member variables.
[Sat Jul 07 17:46:32 2012] [notice] child pid 5775 exit signal Segmentation
fault (11)
I tested with PHP 5.4.4 and it is there, but it also exists in PHP 5.3
Test script:
---------------
<?php
class Crasher extends DateInterval {
public function __construct($time_spec) {
echo "Yes i did it, with the next statement it gives a
segfault\n";
// It doesn't matter if we take the y parameter or any other.
$this->y = 3;
}
}
$c = new Crasher('blah');
?>
Expected result:
----------------
Yes i did it, with the next statement it gives a segfault
Segmentation fault
--
Edit bug report at https://bugs.php.net/bug.php?id=62500&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62500&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62500&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62500&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62500&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62500&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62500&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62500&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62500&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62500&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62500&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62500&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62500&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62500&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62500&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62500&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62500&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62500&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62500&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62500&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62500&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62500&r=mysqlcfg