Bug 132226

Summary: JS math is grotesquely wrong on AMD64
Product: [Fedora] Fedora Reporter: Nicholas Miell <nmiell>
Component: firefoxAssignee: Christopher Aillon <caillon>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dcbw, leonard-rh-bugzilla
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-27 01:12:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 130887    
Attachments:
Description Flags
Enlighten fdlibm regarding AMD64's endianness. none

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.