* [committed] Verify that head of dup-chain is not removed
@ 2020-01-01 0:00 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-01-01 0:00 UTC (permalink / raw)
To: dwz, jakub
Hi,
Check in verify_dups that the head of a duplicate chain has the die_removed
field set to 0, and fix resulting verification failure in split_dups.
Tested with verify_dups_p set on by default.
Committed to trunk.
Thanks,
- Tom
Verify that head of dup-chain is not removed
2020-01-20 Tom de Vries <tdevries@suse.de>
* dwz.c (verify_dups): Check that the head of a duplicate chain has the
die_removed field set to 0.
(split_dups): Make sure that the head of a duplicate chain has the
die_removed field set to 0.
---
dwz.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dwz.c b/dwz.c
index 0e4148f..9702152 100644
--- a/dwz.c
+++ b/dwz.c
@@ -4413,6 +4413,7 @@ verify_dups (dw_die_ref die, bool ordered)
assert (die->die_dup == NULL);
assert (die->die_collapsed_children == 0);
+ assert (die->die_remove == 0);
for (prev = die, d = prev->die_nextdup;
d;
@@ -6517,13 +6518,14 @@ split_dups (dw_die_ref die, struct obstack *vec)
merge_dups (def, decls);
}
- /* If some DIEs are no longer part of a duplicate chain, don't remove
- them. */
for (i = 0; i < count; i++)
{
d = arr[i];
- if (d->die_dup == NULL
- && d->die_nextdup == NULL)
+ if (d->die_dup == NULL)
+ /* If DIE is now either:
+ - no longer part of a duplicate chain, or
+ - head of a duplicate chain,
+ don't remove it. */
d->die_remove = 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-20 15:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01 0:00 [committed] Verify that head of dup-chain is not removed Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).