From 2e6fc1acd0aabb97d68c944650284ea08e87c92f Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 15 Aug 2016 11:23:27 +0000 Subject: [PATCH] gcov-tool: Do not segfault in merge operation (PR PR gcov-profile/67097 * libgcov-util.c (gcov_profile_merge): Skip missing files. From-SVN: r239478 --- libgcc/ChangeLog | 5 +++++ libgcc/libgcov-util.c | 1 + 2 files changed, 6 insertions(+) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 49186faa70f..0853765a3c5 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2016-08-15 Gilles Gouaillardet + + PR gcov-profile/67097 + * libgcov-util.c (gcov_profile_merge): Skip missing files. + 2016-08-10 Martin Liska PR gcov-profile/58306 diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index c8fb52d2b1b..24ee50ec4ab 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.30.2