From patchwork Thu Jan 22 17:10:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 4757 Received: (qmail 12912 invoked by alias); 22 Jan 2015 17:11:02 -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 12887 invoked by uid 89); 22 Jan 2015 17:10:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Fix failure of elf/tst-audit2 when compiled with GCC-5 X-Yow: That's a decision that can only be made between you & SY SPERLING!! Date: Thu, 22 Jan 2015 18:10:51 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 GCC-5 translates a malloc call that is followed by memset on the return value into a call to calloc, which will of course call our calloc recursively. Prevent that by passing -fno-builtin. Tested on x86_64-suse-linux. Andreas. * elf/Makefile (CFLAGS-tst-audit2.c): Define. --- elf/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elf/Makefile b/elf/Makefile index e5b142c..7a1093b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1016,6 +1016,8 @@ $(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so $(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so +# Prevent GCC-5 from translating a malloc/memset pair into calloc +CFLAGS-tst-audit2.c += -fno-builtin tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so $(objpfx)tst-audit9: $(libdl)