PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #44219 Fix for Bug #44209 Causes Test Regression
Submitted:22 Feb 2008 6:28pm UTC Modified: 25 Feb 2008 10:38pm UTC
From:kirkland at ubuntu dot com Assigned to:
Status:Closed Category:Date/time related
Version:5.2.5 OS:Linux 64 bit
View/Vote Developer Edit Submission

[22 Feb 2008 6:28pm UTC] kirkland at ubuntu dot com
Description:
------------
I just rolled the patch associated with the fix from Bug #44209:
http://marc.info/?l=php-cvs&m=120367371119481&w=2

However, I see test regressions on 64-bit Linux.  See the differences
here:
http://pastebin.com/pastebin.php?diff=d365cb1ad

Most of the failed tests are in the date/time realm, so I'd think there
might be some concern.  Thoughts?

[22 Feb 2008 6:38pm UTC] derick@php.net
Not really... it's just that results are sometimes different on 32 vs 64
bit. 
[22 Feb 2008 7:12pm UTC] kirkland at ubuntu dot com
The diff shown in that pastebin is from two subsequent runs, both on
64-bit Linux.

The only difference between the two is:

+++ php-src/ext/date/lib/timelib.h	Fri Feb 22 09:48:18 2008
...
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
...
[22 Feb 2008 8:21pm UTC] kirkland at ubuntu dot com
In other words, adding that 3-line patch creates the following test
regressions.  The following tests now fail on 64-bit Linux:

+ Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30)
[ext/date/tests/bug41523.phpt]

+ mktime() [3] [ext/date/tests/mktime-3.phpt]

+ strtotime() and mysql timestamps
[ext/date/tests/strtotime-mysql.phpt]

+ strtotime() function [ext/date/tests/strtotime3.phpt]

+ wddx deserialization test [ext/wddx/tests/001.phpt]
[22 Feb 2008 8:31pm UTC] kirkland at ubuntu dot com
Test script:
# cat /tmp/foo.php 
<?php
var_dump(strtotime('0000-00-00 00:00:00'));
?>

Built without patch:
# php /tmp/foo.php 
bool(false)

Built with patch:
# ./cli-build/sapi/cli/php /tmp/foo.php 
int(-62169962400)
[24 Feb 2008 7:51pm UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

[25 Feb 2008 11:35am UTC] bisho at onirica dot com
It seens a test-problem, not a regression. The new output of
int(-62169962400) is correct.
[25 Feb 2008 10:38pm UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC