Bug #54925 [NEW]: build php on solaris for 64 bits
| From: | michel dot henaut at everyware dot ch | Date: | Wed, 25 May 2011 12:31:11 +0000 |
| Subject: | Bug #54925 [NEW]: build php on solaris for 64 bits | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-160955@lists.php.net to get a copy of this message | ||
From:
Operating system: solaris
PHP version: 5.2.17
Package: *General Issues
Bug Type: Bug
Bug description:build php on solaris for 64 bits
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 bug report at http://bugs.php.net/bug.php?id=54925&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54925&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54925&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54925&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54925&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54925&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54925&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54925&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54925&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54925&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54925&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54925&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54925&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54925&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54925&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54925&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54925&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54925&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54925&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54925&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54925&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54925&r=mysqlcfg