diff options
| author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-13 11:10:10 +0100 |
|---|---|---|
| committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-26 15:59:29 +0100 |
| commit | 86cb990eeb22d64be6ab4c7ac3c70b507734dfd7 (patch) | |
| tree | 8c5b96bc13dca39d7596c1579e49339434d63b72 /malloc/alloc_buffer_alloc_array.c | |
| parent | a1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca (diff) | |
| download | glibc-86cb990eeb22d64be6ab4c7ac3c70b507734dfd7.tar.xz glibc-86cb990eeb22d64be6ab4c7ac3c70b507734dfd7.zip | |
math: Fix asin and acos invalid exception with old gcc
This works around a gcc issue where it const folded inf/inf into nan,
preventing the invalid exception to be signalled.
(x-x)/(x-x) is more robust against optimizations and works for all
out of bounds values including x==nan.
The gcc issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95115
should be fixed on release branches starting from gcc-10, but it is
better to change the code in case glibc is built with older gcc.
Diffstat (limited to 'malloc/alloc_buffer_alloc_array.c')
0 files changed, 0 insertions, 0 deletions
