From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32477 invoked by alias); 13 Feb 2020 15:58:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 32469 invoked by uid 89); 13 Feb 2020 15:58:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Joseph Myers Cc: Subject: Re: Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487) [committed] References: <87lfp6vlbw.fsf@mid.deneb.enyo.de> Date: Thu, 13 Feb 2020 15:58:00 -0000 In-Reply-To: (Joseph Myers's message of "Thu, 13 Feb 2020 14:26:13 +0000") Message-ID: <877e0qv5t6.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2020-02/txt/msg00582.txt.bz2 * Joseph Myers: > On Thu, 13 Feb 2020, Florian Weimer wrote: > >> Thanks for fixing this. Unfortunately, the test doesn't build on ia64 >> because GCC does not support -fstack-protector-all there: >>=20 >> cc1: error: =E2=80=98-fstack-protector=E2=80=99 not supported for this t= arget [-Werror] >> cc1: all warnings being treated as errors >> make[3]: *** [/mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-gnu/g= libc/sysd-rules:639: /mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-g= nu/glibc/math/test-sinl-pseudo.o] Error 1 > > It looks like ifeq ($(have-ssp),yes) will be needed around that CFLAGS=20 > setting. (I took the unconditional CFLAGS setting from where such a=20 > setting is used in debug/Makefile, but I see that in fact the addition of= =20 > the test there is conditional. In this case, the test is appropriate=20 > unconditionally, it's just the use of -fstack-protector-all that needs to= =20 > be conditional.) This patch seems to fix the build. Okay to install? Subject: math/test-sinl-pseudo: Use stack protector only if available This fixes commit 9333498794cde1d5cca518badf79533a24114b6f ("Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487)."). diff --git a/sysdeps/ieee754/ldbl-96/Makefile b/sysdeps/ieee754/ldbl-96/Mak= efile index 318628aed6..9785b03801 100644 --- a/sysdeps/ieee754/ldbl-96/Makefile +++ b/sysdeps/ieee754/ldbl-96/Makefile @@ -18,5 +18,7 @@ =20 ifeq ($(subdir),math) tests +=3D test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo +ifeq ($(have-ssp),yes) CFLAGS-test-sinl-pseudo.c +=3D -fstack-protector-all -endif +endif=20 +endif # $(subdir) =3D=3D math