[Nasm-bugs] [Bug 3392368] "exponent 32 is too large" undefined behavior at float.c line 559.

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Mon Nov 26 13:52:16 PST 2018


https://bugzilla.nasm.us/show_bug.cgi?id=3392368

--- Comment #10 from H. Peter Anvin <hpa at zytor.com> ---
Nope, it's actually worse than that!

Without changing the if clause, if ms == 0 we are "expecting" v << ms to be
shifted all the way out to make it zero, but v can contain a nonzero value at
that point, since v is never adjusted inside the if clause (and it isn't
needed, either).

So the if clause is wrong, and therein lies the real failure.  The original
assignment of ms on line 546 cannot return a value larger than LIMB_BITS - 1
since v > 0 and therefore log2tbl[v] >= 0.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list