From patchwork Wed Feb 4 23:28:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 436524 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 A5DB8140145 for ; Thu, 5 Feb 2015 10:28:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=HaId1FJDtIi4mYtBZx7kEHDgPWjYgg61wfmlZFhgPPkkZ2eZrBgTe /txHVX3OFfqhKnQYvY15lB13dzPemqiKVobkbN/gC8cOVl7JDg9dSEsoXsMJaz3m fj+8etXBU4poh/PwjSPFjKStZphSq2pm5NpKkqcYt+k99FOIvWEwLs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=7x1acJP4fcjCBkajDMZK+Flbrs0=; b=ebiFG1sWXg5T6oY9y/p2 06SqTv1o9MLo4pupnhprozmI3Z8UhyzyucB1eS8CvOkMGgIxYHf6n9EACD0hIbKu gFjWPZ8C63uEp8DU/emM1kxx4o008H9a0qhsTMF1WpXJczQTuAmcqAsiNftBO/VU 2OLCkOLl+aqJQuY9M2SfLzU= Received: (qmail 32363 invoked by alias); 4 Feb 2015 23:28:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32354 invoked by uid 89); 4 Feb 2015 23:28:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Feb 2015 23:28:18 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id D3B4B5415B2; Thu, 5 Feb 2015 00:28:14 +0100 (CET) Date: Thu, 5 Feb 2015 00:28:14 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Work around Firefox -fprofile-generate crash Message-ID: <20150204232814.GC31160@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, this patch avoids ICE in programs that uses multiple copies of libgcov at once. It is just a temporary workaround as discussed in the PR log. Tested on Firefox and comitted. Honza 2015-02-04 Jan Hubicka PR gcov/64123 * gcov-io.c (gcov_var): Export. Index: gcov-io.c =================================================================== --- gcov-io.c (revision 220411) +++ gcov-io.c (working copy) @@ -39,7 +39,7 @@ static void gcov_allocate (unsigned); /* Optimum number of gcov_unsigned_t's read from or written to disk. */ #define GCOV_BLOCK_SIZE (1 << 10) -GCOV_LINKAGE ATTRIBUTE_HIDDEN struct gcov_var +struct gcov_var { FILE *file; gcov_position_t start; /* Position of first byte of block */