Bug 132226 - JS math is grotesquely wrong on AMD64
Summary: JS math is grotesquely wrong on AMD64
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Christopher Aillon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC3Blocker
TreeView+ depends on / blocked
 
Reported: 2004-09-10 00:15 UTC by Nicholas Miell
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-09-27 01:12:37 UTC
Type: ---
Embargoed:


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

Description Nicholas Miell 2004-09-10 00:15:30 UTC
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-10 00:17:11 UTC
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 13:27:29 UTC
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 23:20:53 UTC
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 15:37:26 UTC
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 15:50:05 UTC
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-27 01:12:37 UTC
Fixed in firefox-0.10.0-1.0PR1.1 which should be available tomorrow
morning.

Comment 7 Christopher Blizzard 2004-09-29 17:08:32 UTC
Was this fixed in the mozilla package as well?

Comment 8 Christopher Blizzard 2004-09-29 17:16:31 UTC
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.