#33562 [NEW]: date("") crash php

From: Date: Mon, 04 Jul 2005 04:53:16 +0000
Subject: #33562 [NEW]: date("") crash php
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81346@lists.php.net to get a copy of this message
From: xuefer at 21cn dot com Operating system: cygwin PHP version: 5CVS-2005-07-04 (dev) PHP Bug Type: Date/time related Bug description: date("") crash php Description: ------------ Breakpoint 1, php_format_date (format=0x1015d770 "", format_len=0, t=0x1015ce28, localtime=1) at /home/Xuefer/src/php5/ext/date/php_date.c:317 317 return string.c; (gdb) p string.c $2 = 0x0 (gdb) l 310 311 smart_str_0(&string); 312 313 if (localtime) { 314 timelib_time_offset_dtor(offset); 315 } 316 317 return string.c; 318 } (gdb) c #0 0x610e9731 in strlen () from /usr/bin/cygwin1.dll #1 0x004256f5 in php_date (ht=1, return_value=0x1015be68, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1) at /home/Xuefer/src/php5/ext/date/php_date.c:344 crash at: (gdb) fr 1 #1 0x004256f5 in php_date (ht=1, return_value=0x1015be68, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1) at /home/Xuefer/src/php5/ext/date/php_date.c:344 344 RETVAL_STRING(string, 0); Reproduce code: --------------- php -r 'date("");' or <?php echo date(""); ?> -- Edit bug report at http://bugs.php.net/?id=33562&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33562&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33562&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33562&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33562&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33562&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33562&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33562&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33562&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33562&r=support Expected behavior: http://bugs.php.net/fix.php?id=33562&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33562&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33562&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33562&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33562&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33562&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33562&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33562&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33562&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33562&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33562&r=mysqlcfg

« previous php.bugs (#81346) next »