Home  |  Linux  | Mysql  | PHP  | XML
Date:Wed Jul  1 11:29:22 2009
Subject:#48752 [Opn->Fbk]: SIGSEGV during date parsing with new timelib
ID: 48752
Updated by: derick@php.net
Reported By: thetaphi@php.net
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Solaris 10 x86
PHP Version: 5.3.0
-Assigned To:
+Assigned To: derick
New Comment:

Is this a threaded SAPI? (I think I see what the problem is, just need
a confirmation).


Previous Comments:
------------------------------------------------------------------------

[2009-07-01 10:52:23] thetaphi@php.net

Description:
------------
I found a second problem with our PHP installation. Sometimes, not
everytime, the server crashes with sigsegv when parsing date/times. I
cannot reproduce the crash, I only can post the code that most times
crash.

Reproduce code:
---------------
This code crashes not always, but often. The $mindate initially
contains as noted in the core dump: 1998-01-01

This is enetered by a user any may look different. The code is used to
fomat any input from the users to an ATOM timestamp.

$mindate=new DateTime($mindate,new DateTimeZone('UTC'));
$search->dateTimeCoverage->min=$mindate->format(DateTime::ATOM);


Expected result:
----------------
The server should not crash.

Actual result:
--------------
Core was generated by `webservd -d
/pangaea/webserver70/https-panwebserver/config -r /pangaea/webserve'.
Program terminated with signal 11, Segmentation fault.
#0 0xfc2b5a44 in timelib_error_container_dtor (errors=0x6d) at
/pangaea/install/php-5.3.0/ext/date/lib/timelib.c:153
153 for (i = 0; i < errors->warning_count; i++) {

(gdb) where
#0 0xfc2b5a44 in timelib_error_container_dtor (errors=0x6d) at
/pangaea/install/php-5.3.0/ext/date/lib/timelib.c:153
#1 0xfc29636d in date_initialize (dateobj=0xa963cd0,
time_str=0xa9620a0 "1998-01-01", time_str_len=179481560,
format=0xfca4e4e8 "\v", timezone_object=0xa963bb8, ctor=1,
tsrm_ls=0xaa57068)
at /pangaea/install/php-5.3.0/ext/date/php_date.c:2339
#2 0xfc296728 in zim_DateTime___construct (ht=2,
return_value=0xa963d28, return_value_ptr=0x0, this_ptr=0xa963b6c,
return_value_used=0, tsrm_ls=0xaa57068) at
/pangaea/install/php-5.3.0/ext/date/php_date.c:2479
#3 0xfc56ce5d in zend_do_fcall_common_helper_SPEC
(execute_data=0xa9694a0, tsrm_ls=0xaa57068)
at /pangaea/install/php-5.3.0/Zend/zend_vm_execute.h:313
#4 0xfc56bce2 in execute (op_array=0xa950570, tsrm_ls=0xaa57068) at
/pangaea/install/php-5.3.0/Zend/zend_vm_execute.h:104
#5 0xfc54a103 in zend_execute_scripts (type=8, tsrm_ls=0xaa57068,
retval=0x0, file_count=3)
at /pangaea/install/php-5.3.0/Zend/zend.c:1188
#6 0xfc4f5562 in php_execute_script (primary_file=0xeabe7cb8,
tsrm_ls=0xaa57068) at /pangaea/install/php-5.3.0/main/main.c:2196
#7 0xfc5d5916 in php5_execute (pb=0xa818228, sn=0x9e761dc,
rq=0x9e76254) at /pangaea/install/php-5.3.0/sapi/nsapi/nsapi.c:1040
#8 0xfecfb147 in func_exec_str () from
/pangaea/webserver70/lib/libns-httpd40.so
#9 0xfecfbd2a in INTfunc_exec_directive () from
/pangaea/webserver70/lib/libns-httpd40.so
#10 0xfed009d6 in INTservact_service () from
/pangaea/webserver70/lib/libns-httpd40.so
#11 0xfed01a39 in INTservact_handle_processed () from
/pangaea/webserver70/lib/libns-httpd40.so
#12 0xfed5e358 in __1cLHttpRequestUUnacceleratedRespond6M_v_ () from
/pangaea/webserver70/lib/libns-httpd40.so
#13 0xfed5d5ba in __1cLHttpRequestNHandleRequest6MpnGnetbuf_I_i_ ()
from /pangaea/webserver70/lib/libns-httpd40.so
#14 0xfed5be90 in __1cNDaemonSessionDrun6M_v_ () from
/pangaea/webserver70/lib/libns-httpd40.so
#15 0xfeb861fc in ThreadMain () from
/pangaea/webserver70/lib/libnsprwrap.so
#16 0xfe0bb6c9 in _pt_root () from
/pangaea/webserver70/lib/libnspr4.so
#17 0xfd37fd36 in _thr_setup () from /lib/libc.so.1
#18 0xfd380020 in L3_doit () from /lib/libc.so.1
#19 0xfb321400 in ?? ()
#20 0x00000000 in ?? ()



------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=48752&edit=1

Navigate in group php.bugs at sever news.php.net
Previous Next





  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.