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: 431921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA69D14029C for ; Fri, 23 Jan 2015 04:11:11 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=XOSR1BFRpuYUdPqDFNKnjoHzAEno2 Au6e+aBL1zruxIjOlxG9em+DSCMc0ufofRjC4L1UAp0w93SXCPVvSdMX4ZlO42/1 ROUqTOM978rxlB47KaAvdkOKVSDFH6hUL7NUuNzlsMZHRoxT0y1VR9amlFoq3bxo AEComfQGtImr/A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=jhMvht+zvuwdvKRcryiTyI+XA08=; b=qW5 SO06SxtPxC1I1o6SHVoqSRLw323tNbs2MMU4VIdJopiTBVNlByxsnytjrUkQ0YaN U1rQGrSSPWEpQhEUNHe/sxdbV3KlXnUJ9Q7dy1GJeIlcWEWorlymzxNcqRiepUt9 oALVHmjMV38/RoVqDsG2aUIb1EhsLHEuGFwCnTKk= 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)