Bug 132226 - JS math is grotesquely wrong on AMD64
JS math is grotesquely wrong on AMD64
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Aillon
: Patch
Depends On:
Blocks: FC3Blocker
  Show dependency treegraph
Reported: 2004-09-09 20:15 EDT by Nicholas Miell
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-26 21:12:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Enlighten fdlibm regarding AMD64's endianness. (1.10 KB, patch)
2004-09-09 20:17 EDT, Nicholas Miell
no flags Details | Diff

  None (edit)
Description Nicholas Miell 2004-09-09 20:15:30 EDT
Instead of using libm, the JavaScript interpreter uses it's own
internal copy of fdlibm.

fdlibm assumes (unless otherwise specified) that the target
architecture is big endian, which leads major problems on AMD64, which
is a little endian arch that fdlibm doesn't know about.

Quick fix for AMD64 is attached. Other little endian architectures
that fdlibm doesn't know about will probably also need to be fixed.

Upstream bug: http://bugzilla.mozilla.org/show_bug.cgi?id=253241
Comment 1 Nicholas Miell 2004-09-09 20:17:11 EDT
Created attachment 103660 [details]
Enlighten fdlibm regarding AMD64's endianness.

This also does s/VA_COPY/va_copy/, which doesn't seem to break firefox in
practice, but does break the stand-alone JS interpreter.
Comment 2 Christopher Aillon 2004-09-10 09:27:29 EDT
Our Firefox package will pull this in when upstream pushes its next
release, which according to the roadmap will be soon.
Comment 3 Nicholas Miell 2004-09-21 19:20:53 EDT
The 1.0 PR1 release does not include this bug fix, and, afaik, this
fix has not yet been merged upstream.

The Fedora roadmap lists the FC3 final release date as Nov 1, the
Mozilla roadmap lists the Firefox 1.0 release date as Oct 11.

If the Firefox final release date slips past the FC3 release date, or
this fix is not merged upstream in time for Firefox 1.0, then this
patch will need to be applied to whatever ships in FC3.
Comment 4 Dan Williams 2004-09-24 11:37:26 EDT
This seems like a no-brainer to apply though Chris...  can't we
include it until it actually _does_ come down from upstream?
Comment 5 Christopher Aillon 2004-09-24 11:50:05 EDT
The patch attached does not compile across the board.  I pinged
upstream yesterday and there is something checked in now that I'll
have a look at and port over to our builds.
Comment 6 Christopher Aillon 2004-09-26 21:12:37 EDT
Fixed in firefox-0.10.0-1.0PR1.1 which should be available tomorrow
Comment 7 Christopher Blizzard 2004-09-29 13:08:32 EDT
Was this fixed in the mozilla package as well?
Comment 8 Christopher Blizzard 2004-09-29 13:16:31 EDT
Ahh, looks like it's in the 1.7.x tree.

Note You need to log in before you can comment on or make changes to this bug.