diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-15 11:23:27 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-15 11:23:27 +0000 |
commit | 196b8968203ba2585e46b596f40070829fb23d99 (patch) | |
tree | cf6426f3ad8d60f02319d4aabc735b1fc96a4f6f /libgcc/libgcov-util.c | |
parent | b3532bc13b8f5c6f2e34920e3bd51abaff588520 (diff) | |
download | gcc-196b8968203ba2585e46b596f40070829fb23d99.tar.gz |
gcov-tool: Do not segfault in merge operation (PR
PR gcov-profile/67097
* libgcov-util.c (gcov_profile_merge): Skip missing files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/libgcov-util.c')
-rw-r--r-- | libgcc/libgcov-util.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |