freebsd-skq/lib/msun
eadler b21ccf63f2 msun: signed overflow in atan2
As a component of atan2(y, x), the case of x == 1.0 is farmed out to
atan(y). The current implementation of this comparison is vulnerable
to signed integer underflow (that is, undefined behavior), and it's
performed in a somewhat more complicated way than it need be. Change
it to not be quite so cute, rather directly comparing the high/low
bits of x to the specific IEEE-754 bit pattern that encodes 1.0.

Note that while there are three different e_atan* files in the
relevant directory, only this one needs fixing. e_atan2f.c already
compares against the full bit pattern encoding 1.0f, while
e_atan2l.cuses bitwise-ands/ors/nots and so doesn't require a change.

Closes #130

Submitted by:	Jeff Walden (@jswalden github PR #130)
Reviewed by:	bde
MFC After:	1 month
2018-02-14 07:59:30 +00:00
..
aarch64 Add the fe* symbols to libm for arm64. 2015-03-31 19:07:28 +00:00
amd64 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
arm lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
bsdsrc Remove an unused incude from lib/msun/bsdsrc/b_log.c. 2017-12-07 20:41:23 +00:00
i387 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
ld80 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
ld128 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
man cacos(3): correct spelling of 'I' 2017-12-31 00:55:00 +00:00
mips lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
powerpc lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
riscv libm: remove duplicate version script entries 2016-11-29 18:40:24 +00:00
sparc64 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
src msun: signed overflow in atan2 2018-02-14 07:59:30 +00:00
tests DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
x86 lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
Makefile Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Symbol.map Implement sincos, sincosf, and sincosl. 2017-05-28 06:13:38 +00:00