#37747 [NEW]: strtotime segfaults when given "nextyear"

From: Date: Thu, 08 Jun 2006 15:02:14 +0000
Subject: #37747 [NEW]: strtotime segfaults when given "nextyear"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98189@lists.php.net to get a copy of this message
From: php at stut dot net Operating system: FreeBSD 5.4-RELEASE PHP version: 5CVS-2006-06-08 (CVS) PHP Bug Type: Date/time related Bug description: strtotime segfaults when given "nextyear" Description: ------------ Segfault when giving strtotime "nextyear" Reproduce code: --------------- <?php if (strtotime('2007-01-01') == strtotime('nextyear', strtotime('2006-01-01'))) print "Success"; else print "Failure"; ?> Expected result: ---------------- Prints "Success" Actual result: -------------- Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.2...done. Loaded symbols for /lib/libcrypt.so.2 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /lib/libm.so.3...done. Loaded symbols for /lib/libm.so.3 Reading symbols from /usr/local/lib/libxml2.so.5...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /lib/libz.so.2...done. Loaded symbols for /lib/libz.so.2 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 timelib_set_relative (ptr=0x0, amount=0, behavior=0, s=0xbfbfd240) at parse_date.re:594 594 switch (relunit->unit) { -- Edit bug report at http://bugs.php.net/?id=37747&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37747&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37747&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37747&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37747&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37747&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37747&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37747&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37747&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37747&r=support Expected behavior: http://bugs.php.net/fix.php?id=37747&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37747&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37747&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37747&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37747&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37747&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37747&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37747&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37747&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37747&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37747&r=mysqlcfg

« previous php.bugs (#98189) next »