#48559 [Com]: Object comparison using unserialized DateTime object causes segfault
| From: | thomas dot corbiere at free dot fr | Date: | Fri, 19 Feb 2010 08:08:37 +0000 |
| Subject: | #48559 [Com]: Object comparison using unserialized DateTime object causes segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-147844@lists.php.net to get a copy of this message | ||
ID: 48559
Comment by: thomas dot corbiere at free dot fr
Reported By: felipe@php.net
Status: Assigned
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2CVS-2009-06-15 (CVS)
Assigned To: derick
New Comment:
Same problem with PHP 5.2.12 on Windows Server 2003 R2
Previous Comments:
------------------------------------------------------------------------
[2009-06-23 20:24:59] sjoerd-php at linuxonly dot nl
Could reproduce on PHP 5.2.10 (cli), not on PHP 5.3.0RC4 (cli).
------------------------------------------------------------------------
[2009-06-15 13:51:45] felipe@php.net
Description:
------------
This issue just occurs on 5.2.
See the code below.
Reproduce code:
---------------
<?php
unserialize(serialize(new datetime())) == new datetime;
Expected result:
----------------
No SIGSEGV.
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e89b70 (LWP 24361)]
0x080bed7a in date_object_compare_date (d1=0xa7a5308, d2=0xa7a5288,
tsrm_ls=0xa5802a8) at /home/felipe/dev/php5_2/ext/date/php_date.c:1581
1581 if (!o1->time->sse_uptodate) {
(gdb) bt
#0 0x080bed7a in date_object_compare_date (d1=0xa7a5308, d2=0xa7a5288,
tsrm_ls=0xa5802a8) at /home/felipe/dev/php5_2/ext/date/php_date.c:1581
#1 0x084e3773 in compare_function (result=0xbfc93f10, op1=0xa7a5308,
op2=0xa7a5288, tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_operators.c:1416
#2 0x084e404c in is_equal_function (result=0xbfc93f10, op1=0xa7a5308,
op2=0xa7a5288, tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_operators.c:1547
#3 0x0853b9f1 in ZEND_IS_EQUAL_SPEC_VAR_VAR_HANDLER
(execute_data=0xbfc93f44, tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_vm_execute.h:11516
#4 0x085126e4 in execute (op_array=0xa7a5a10, tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_vm_execute.h:92
#5 0x084da6aa in zend_eval_string (str=0xbfc957dc
"unserialize(serialize(new datetime())) == new datetime;",
retval_ptr=0x0,
string_name=0x87fb6dc "Command line code", tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_execute_API.c:1214
#6 0x084da8e2 in zend_eval_string_ex (str=0xbfc957dc
"unserialize(serialize(new datetime())) == new datetime;",
retval_ptr=0x0,
string_name=0x87fb6dc "Command line code", handle_exceptions=1,
tsrm_ls=0xa5802a8) at
/home/felipe/dev/php5_2/Zend/zend_execute_API.c:1248
#7 0x08573484 in main (argc=3, argv=0xbfc94314) at
/home/felipe/dev/php5_2/sapi/cli/php_cli.c:1201
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48559&edit=1