This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487) [committed]


* Joseph Myers:

> Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero
> argument (an representation where all the significand bits, including
> diff --git a/sysdeps/ieee754/ldbl-96/Makefile b/sysdeps/ieee754/ldbl-96/Makefile
> index 995e90d6da..318628aed6 100644
> --- a/sysdeps/ieee754/ldbl-96/Makefile
> +++ b/sysdeps/ieee754/ldbl-96/Makefile
> @@ -17,5 +17,6 @@
>  # <https://www.gnu.org/licenses/>.
>  
>  ifeq ($(subdir),math)
> -tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96
> +tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo
> +CFLAGS-test-sinl-pseudo.c += -fstack-protector-all
>  endif
> diff --git a/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c b/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c

Thanks for fixing this.  Unfortunately, the test doesn't build on ia64
because GCC does not support -fstack-protector-all there:

cc1: error: ‘-fstack-protector’ not supported for this target [-Werror]
cc1: all warnings being treated as errors
make[3]: *** [/mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-gnu/glibc/sysd-rules:639: /mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-gnu/glibc/math/test-sinl-pseudo.o] Error 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]