Closed Bug 1284293 Opened 3 years ago Closed 9 months ago
menus and dialogs missing text due to FIX
_FPU on 32 bit linux with musl libc
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160525213134 Steps to reproduce: build firefox 45esr on 32bit alpine linux (musl libc) and started firefox. Actual results: fonts and menus disappeared due to the FIX_FPU function will mess with the floating point precision and then DPI calculation will call libc math function round() which is broken. details and screenshots reported on alpine bug tracker: http://bugs.alpinelinux.org/issues/4248 Expected results: fonts and menus should been displayed properly
Product: Firefox → Core
Not just math functions. Setting the fpu control word to a value that yields non-conforming behavior breaks _any_ code which uses floating point, which could be any third-party library code including any function in libc. If the JS implementation does not actually depend on this mode setting (e.g. if it's actually using SSE2 for floating point anyway) then the above code should just be removed. If it does depend on this then it needs to switch mode every time control passes in/out of the JS implementation. Also note that the comment (and most x87 documentation) is incorrect. Bit 9 does not set "64-bit precision" but rather sets "53-bit significand" mode. The exponent is still 15 bits like normal x87 long double. Thus this mode cannot be used to implement correct IEEE double semantics; overflow/underflow do not occur as expected, and values which are nominally denormal actually behave as normal.
Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1342176
You need to log in before you can comment on or make changes to this bug.