From patchwork Mon Aug 8 14:16:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 656740 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 3s7KHJ04K5z9sdg for ; Tue, 9 Aug 2016 00:17:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=G7FeMOCW; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=XmUcqPObI4tTawp2alyGJSyXBsW/6BupPa6kVa0SqyoZ0joT0J zw4OxBrlE9UJ6mim4Crwfxc/LvmcuumjqedI3HN70QjK5KRGlDJXB5pCKPUGL1r0 qKxlSpbLtxw/wTyfK9GO4+GlIRUIb4SWxkN8jCBgcI0rHqumTpULSg6S0= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=fJcZVnW/yBRSAa2mz3S3CBFSoRo=; b=G7FeMOCWiyD4ObZL6mah pFnc58B6EilF1k0M4klno3SU/m9OyPg7tcEIgXISqRD21DDOI1iHfR5bcczmaya7 ifT5ESUdtMGorcYM24aQItfL3YPKgHZGT8cXQk4QkSag7qjnwechLbLDldiuNY3f RdnF2ygNgA7hJYNFG86NVvk= Received: (qmail 83949 invoked by alias); 8 Aug 2016 14:17:07 -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 83939 invoked by uid 89); 8 Aug 2016 14:17:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 08 Aug 2016 14:16:56 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C657DAC27; Mon, 8 Aug 2016 14:16:53 +0000 (UTC) To: GCC Patches Cc: gilles.gouaillardet@gmail.com, Nathan Sidwell From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] gcov-tool: Do not segfault in merge operation (PR, gcov-profile/67097). Message-ID: <0df5a3b1-4608-58b5-add8-c8e0e442ec4e@suse.cz> Date: Mon, 8 Aug 2016 16:16:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 X-IsSubscribed: yes Hi. Following simple patch is a fix for $subject. Ready for trunk? Martin From 936e45b384f30f560cacafb7bb6ed9968e4faa96 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 8 Aug 2016 16:09:06 +0200 Subject: [PATCH] gcov-tool: Do not segfault in merge operation (PR gcov-profile/67097). libgcc/ChangeLog: 2016-08-08 Gilles Gouaillardet * libgcov-util.c (gcov_profile_merge): Skip missing files. --- libgcc/libgcov-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 7b3bc31..df3672e 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -673,6 +673,7 @@ gcov_profile_merge (struct gcov_info *tgt_profile, struct gcov_info *src_profile { gi_ptr = in_src_not_tgt[i]; gcov_merge (gi_ptr, gi_ptr, w2 - 1); + gi_ptr->next = NULL; tgt_tail->next = gi_ptr; tgt_tail = gi_ptr; } -- 2.9.2