Bug #70626 [NEW]: PHP segfaults or reports "zend_mm_heap corrupted" for some date functions
| From: | michael at michaelmarley dot com | Date: | Fri, 02 Oct 2015 22:24:25 +0000 |
| Subject: | Bug #70626 [NEW]: PHP segfaults or reports "zend_mm_heap corrupted" for some date functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-196359@lists.php.net to get a copy of this message | ||
From: michael at michaelmarley dot com
Operating system: Linux x86_64
PHP version: 7.0.0RC4
Package: Reproducible crash
Bug Type: Bug
Bug description:PHP segfaults or reports "zend_mm_heap corrupted" for some date functions
Description:
------------
Starting with PHP 7.0.0 RC4, I get "zend_mm_heap corrupted" errors or
segfaults when executing some date functions. I included a simple
example that causes the problem.
The problem occurs both for CLI and FPM modes. In FPM mode, it always
causes a segfault. In CLI mode, it usually prints "zend_mm_heap
corrupted", but segfaults sometimes. I tried to capture a backtrace by
running it in CLI in GDB, but it never seems to segfault while running
in GDB; it always displays the corruption message instead. The message
or segfault always occurs at the end of the script, so even if I put
more code below the line that triggers the crash, that code will execute
successfully. It always crashes at the end of the script though.
I am using the packages from here:
https://launchpad.net/~mamarley/+archive/ubuntu/php-exp.
If it matters,
they were compiled with GCC 5.2. I have no third-party extensions
enabled (only opcache, gd, pgsql, and pdo_pgsql). I have also tried
with all the extensions disabled and still gotten the same problem.
I am sorry for the lack of debugging information here, but I am at a
loss about how to collect anything useful. If you let me know what I
should do, I would be glad to do it though.
Test script:
---------------
<?php
$date=date_create(date("Y-m-d"));
print_r($date);
?>
Expected result:
----------------
DateTime Object
(
[date] => 2015-10-02 00:00:00.000000
[timezone_type] => 3
[timezone] => America/New_York
)
Actual result:
--------------
DateTime Object
(
[date] => 2015-10-02 00:00:00.000000
[timezone_type] => 3
[timezone] => America/New_York
)
zend_mm_heap corrupted
or
DateTime Object
(
[date] => 2015-10-02 00:00:00.000000
[timezone_type] => 3
[timezone] => America/New_York
)
Segmentation fault
--
Edit bug report at https://bugs.php.net/bug.php?id=70626&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70626&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70626&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70626&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70626&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70626&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70626&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70626&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70626&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70626&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70626&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70626&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70626&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70626&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70626&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70626&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70626&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70626&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70626&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70626&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70626&r=mysqlcfg