ID:               48276
 Comment by:       rleeden at gmail dot com
 Reported By:      info at programmiernutte dot net
 Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Mac OS X 10.4 PPC
 PHP Version:      5.3.0RC2
 Assigned To:      derick
 New Comment:

Also, seeing this after upgrading from 5.2.9 to 5.2.10.

On Solaris Sparc version 9.

     <?=date(Y); ?>

returns 0000 on 5.2.10
and returns 2009 as expected on 5.2.9


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

[2009-06-20 15:15:41] xserve at web dot de

This bug still exits in the same way with PHP 5.2.10.

Found after upgrade from 5.2.9 to 5.2.10 on a Mac OS X 10.4.11 Server 
PPC.

With 5.2.9 

     <?=date(Y); ?>

works as expected.

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

[2009-05-28 10:07:22] der...@php.net

Seems like it's an issue in slprintf:

1017                    switch (format[i]) {
(gdb) 
1043                                    timelib_sll year = PHP_LLABS(t->y);
(gdb) print year
$1 = 1230768000
(gdb) next
1044                                    length = slprintf(buffer, 32, 
"%s%04ld", t->y < 0 ? "-" : "",
year); break;
(gdb) print year
$2 = 2009
(gdb) next
1124                    smart_str_appendl(&string, buffer, length);
(gdb) print buffer
$3 =
"0000\000\000\004\202\000\000\000\000\000\000\000\000I\\\a\200\000\000\000\000\000\000\0006\000\000\000\000"
(gdb) next
1015            for (i = 0; i < format_len; i++) {
(gdb) print &string
$4 = (smart_str *) 0xffa1cde0
(gdb) print string
$5 = {c = 0x1071f060 "0000\020q�X\020c\003�", len = 4, a = 78}


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

[2009-05-28 08:42:28] der...@php.net

Oh, I had forgotten about that PPC machine. I'll have a look.

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

[2009-05-28 03:56:41] scott...@php.net

We have a PPC test machine, Derick has access and I can set up other
accounts if needed.

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

[2009-05-28 00:45:05] ras...@php.net

So there is an endian issue somewhere.  How are you with gdb?  Could
you set a breakpoint on the function and work your way through it and
figure out where it goes south?

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48276

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

Reply via email to