From patchwork Thu Feb 13 15:57:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 38036 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-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@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 16:57:09 +0100 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 * 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: >> >> 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 > > It looks like ifeq ($(have-ssp),yes) will be needed around that CFLAGS > setting. (I took the unconditional CFLAGS setting from where such a > setting is used in debug/Makefile, but I see that in fact the addition of > the test there is conditional. In this case, the test is appropriate > unconditionally, it's just the use of -fstack-protector-all that needs to > 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/Makefile index 318628aed6..9785b03801 100644 --- a/sysdeps/ieee754/ldbl-96/Makefile +++ b/sysdeps/ieee754/ldbl-96/Makefile @@ -18,5 +18,7 @@ ifeq ($(subdir),math) tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo +ifeq ($(have-ssp),yes) CFLAGS-test-sinl-pseudo.c += -fstack-protector-all -endif +endif +endif # $(subdir) == math