Bug #70626 [Opn->Fbk]: PHP segfaults or reports "zend_mm_heap corrupted" for some date functions
| From: | laruence@php.net | Date: | Sat, 03 Oct 2015 04:19:36 +0000 |
| Subject: | Bug #70626 [Opn->Fbk]: PHP segfaults or reports "zend_mm_heap corrupted" for some date functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196360@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70626&edit=1
ID: 70626
Updated by: laruence@php.net
Reported by: michael at michaelmarley dot com
Summary: PHP segfaults or reports "zend_mm_heap corrupted"
for some date functions
-Status: Open
+Status: Feedback
Type: Bug
Package: Reproducible crash
Operating System: Linux x86_64
PHP Version: 7.0.0RC4
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I can not reproduce this ...
Previous Comments:
------------------------------------------------------------------------
[2015-10-02 22:24:23] michael at michaelmarley dot com
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 this bug report at https://bugs.php.net/bug.php?id=70626&edit=1