Edit report at https://bugs.php.net/bug.php?id=54925&edit=1

 ID:                 54925
 Updated by:         [email protected]
 Reported by:        michel dot henaut at everyware dot ch
 Summary:            build php on solaris for 64 bits
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   solaris
 PHP Version:        5.2.17
-Assigned To:        
+Assigned To:        srinatar
 Block user comment: N
 Private report:     N

 New Comment:

assigning this to people working at oracle.


Previous Comments:
------------------------------------------------------------------------
[2011-05-27 07:39:20] eugene at zhegan dot in

Same here.
PHP 5.3.6.

# cc -V
cc: Sun C 5.10 SunOS_i386 2009/06/03

Same workaround does help (thanks, Michael, by the way).

------------------------------------------------------------------------
[2011-05-25 14:31:09] michel dot henaut at everyware dot ch

Description:
------------
Build php on solaris with Sun compiler:

The default build for 64 bits, i.e. CFLAGS='-m64' produces strange results.
Rebuilding all with CFLAGS='-m64 -O -xs -xstrconst -zlazyload' seems to work.

To reproduce it:

$obj[0]['data'][0]['Usr'] = 0.009035;
echo json_encode($obj);

with just CFLAGS='-m64'
[{"data":[{"Usr":INF}]}]

with CFLAGS='-m64 -O -xs -xstrconst -zlazyload'
[{"data":[{"Usr":0.009035}]}]
which is correct.

may be a problem in main/snprintf.c and in main/spprintf.c

regards 




Test script:
---------------
$obj[0]['data'][0]['Usr'] = 0.009035;
echo json_encode($obj);


Expected result:
----------------
[{"data":[{"Usr":0.009035}]}]

Actual result:
--------------
[{"data":[{"Usr":INF}]}]


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



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

Reply via email to