ID:               48247
 User updated by:  dmi...@php.net
 Reported By:      dmi...@php.net
-Status:           Feedback
+Status:           Open
 Bug Type:         Date/time related
 Operating System: *
 PHP Version:      5.*, 6CVS (2009-05-12)
 Assigned To:      jani
 New Comment:

Unfortunately this patch doesn't fix the bug.


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

[2009-05-13 00:46:26] j...@php.net

Dmitry, I committed a fix in HEAD. Please check it out. If you agree, 
I'll MFH to other branches.

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

[2009-05-12 17:11:00] j...@php.net

And of course this problem exists in all branches.

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

[2009-05-12 16:31:46] j...@php.net

See also bug #37111 which is similar problem, just during shutdown.

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

[2009-05-12 16:09:53] dmi...@php.net

Description:
------------
PHP crashes in case of warning messages during MINIT().

In case of warning messages during MINIT() the php_log_err() function
is called. In case error_log directive is set to log errors into file
this function tries to add timestamp using formatting through
php_format_date(). However it leads PHP into infinity recursion if TZ
isn't set, because php_format_date() throws another warning.

Even preventing the recursion with static flag makes PHP crash in
ext/date because of uninitialized DATEG(tzcache).

#0  0x084922d2 in zend_hash_find (ht=0x89e9ac8, 
    arKey=0x857edbd "Europe/Moscow", nKeyLength=14, pData=0xffffceac)
    at /home/dmitry/php/php5.3/Zend/zend_hash.c:880
#1  0x08142ff1 in php_date_parse_tzfile (
    formal_tzname=0x857edbd "Europe/Moscow", tzdb=0x85cb9c8)
    at /home/dmitry/php/php5.3/ext/date/php_date.c:813
#2  0x081432a9 in get_timezone_info ()
    at /home/dmitry/php/php5.3/ext/date/php_date.c:917
#3  0x08144d8c in php_format_date (format=0x899b203 "d-M-Y H:i:s", 
    format_len=11, ts=1242143549, localtime=1)
    at /home/dmitry/php/php5.3/ext/date/php_date.c:1166
#4  0x08415f16 in php_log_err (
    log_message=0xf7f8f678 "PHP Warning:  test in Unknown on line 0")
    at /home/dmitry/php/php5.3/main/main.c:547
#5  0x08416db9 in php_error_cb (type=2, error_filename=0x89b00cf
"Unknown", 
    error_lineno=0, format=0x899bb97 "test", args=0xffffd088 "\005")
    at /home/dmitry/php/php5.3/main/main.c:958
#6  0x084832d2 in zend_error (type=2, format=0x899bb97 "test")
    at /home/dmitry/php/php5.3/Zend/zend.c:1020
#7  0x08418ecf in php_module_startup (sf=0x89d11a0,
additional_modules=0x0, 
    num_additional_modules=0) at
/home/dmitry/php/php5.3/main/main.c:2021
#8  0x08546f59 in php_cli_startup (sapi_module=0x89d11a0)
    at /home/dmitry/php/php5.3/sapi/cli/php_cli.c:399




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


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

Reply via email to