#48247 [NEW]: PHP crashes on errors during startup
| From: | dmitry@php.net | Date: | Tue, 12 May 2009 16:09:54 +0000 |
| Subject: | #48247 [NEW]: PHP crashes on errors during startup | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137207@lists.php.net to get a copy of this message | ||
From: dmitry@php.net
Operating system: *
PHP version: 5.3CVS-2009-05-12 (CVS)
PHP Bug Type: Date/time related
Bug description: PHP crashes on errors during startup
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 bug report at http://bugs.php.net/?id=48247&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48247&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48247&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48247&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48247&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48247&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48247&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48247&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48247&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48247&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48247&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48247&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48247&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48247&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48247&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48247&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48247&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48247&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48247&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48247&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48247&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48247&r=mysqlcfg