Bug #70688 [Opn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
Edit report at https://bugs.php.net/bug.php?id=70688&edit=1
ID: 70688
Updated by: derick@php.net
Reported by: jerome at taotesting dot com
Summary: new DateTime object produces Segmentation fault or
zend_mm_heap corrupted
Status: Open
Type: Bug
Package: Date/time related
Operating System: 3.19.0-30-generic 14.04 Ubuntu
PHP Version: 7.0.0RC4
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Dmitry, I think this is related to your memory management macros.
Previous Comments:
------------------------------------------------------------------------
[2015-10-11 17:02:00] jerome at taotesting dot com
Please find below the backtrace:
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Reading symbols from /usr/bin/php7.0...(no debugging symbols found)...done.
[New LWP 2170]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php date.php'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000075aa3a in _efree ()
(gdb) bt
#0 0x000000000075aa3a in _efree ()
#1 0x00000000004a1107 in timelib_tzinfo_dtor ()
#2 0x000000000078b962 in zend_hash_destroy ()
#3 0x000000000047729c in zm_deactivate_date ()
#4 0x0000000000781e24 in zend_deactivate_modules ()
#5 0x000000000071ee45 in php_request_shutdown ()
#6 0x0000000000801262 in ?? ()
#7 0x00000000004770a0 in main ()
------------------------------------------------------------------------
[2015-10-11 13:54:32] felipe@php.net
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.
------------------------------------------------------------------------
[2015-10-11 01:50:51] jerome at taotesting dot com
More readable OS version edited.
------------------------------------------------------------------------
[2015-10-11 01:44:35] jerome at taotesting dot com
Description:
------------
Dear PHP Team,
When instantiating a DateTime object with PHP 7.0.0RC4 using PHP CLI, the output systematically
contains "zend_mm_heap corrupted" OR "Segmentation fault (core dumped)".
I'm using the PHP 7.0.0RC4 package provided by ondrej (ppa:ondrej/php-7.0) for Ubuntu. In
addition with the following test script, expected output and actual output, I must say that calling
date_default_timezone_set('Europe/Brussels');
does not help either.
Thanks for fixing it, as we are waiting PHP7.0.0 as the messiah :) !
Thanks a lot also for all your efforts for making PHP better every day!
All the best,
Jérôme Bogaerts
Test script:
---------------
<?php
$date = new \DateTime('2000-01-01');
echo $date->format('Y-m-d') . "\n";
Expected result:
----------------
// -- Expected output is simple as:
2000-01-01
Actual result:
--------------
// -- Output when php.ini's directive date.timezone is commented (using ;)
2000-01-01
zend_mm_heap corrupted
// OR (randomly)
2000-01-01
Segmentation fault (core dumped)
// -- Output when php.ini's directive date.timezone = Europe/Brussels
2000-01-01
zend_mm_heap corrupted
// OR (randomly)
2000-01-01
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70688&edit=1
Thread (16 messages)
- jerome at taotesting dot com
- jerome at taotesting dot comBug #70688 [Opn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- felipe@php.netBug #70688 [Opn->Fbk]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Fbk->Opn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- derick@php.netBug #70688 [Opn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- dmitry@php.netBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- dmitry@php.netBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- jerome at taotesting dot comBug #70688 [Asn]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- nikic@php.netBug #70688 [Asn->Csd]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted
- mihor dot cz at gmail dot comBug #70688 [Com]: new DateTime object produces Segmentation fault or zend_mm_heap corrupted