From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [PATCH] [multi-file] Handle DW_FORM_ref_addr reference that points to containing unit
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20190307073649.GA23184@delia> (raw)
[ Submitted earlier off-list ]
Hi,
For test-cases with DW_FORM_ref_addr attributes that point to within the CU
containing the attribute, we run into the following assert in multifile mode:
...
dwz: dwz.c:1984: checksum_die: Assertion `
((!op_multifile && !rd_multifile && !fi_multifile) || cu != die_cu (ref))
&& (!op_multifile || cu->cu_chunk == die_cu (ref)->cu_chunk)
' failed.
...
This conservative fix detects the situation, and instead of asserting stops
further processing of the DIE.
OK for trunk?
Thanks,
- Tom
[multi-file] Handle DW_FORM_ref_addr reference that points to containing unit
2019-02-05 Tom de Vries <tdevries@suse.de>
PR dwz/24170
* dwz.c (checksum_die): Handle DW_FORM_ref_addr references that points
to containing unit conservatively.
---
dwz.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dwz.c b/dwz.c
index 4ef8657..0415630 100644
--- a/dwz.c
+++ b/dwz.c
@@ -1979,10 +1979,13 @@ checksum_die (DSO *dso, dw_cu_ref cu, dw_die_ref top_die, dw_die_ref die)
}
if (unlikely (op_multifile) && ref->die_collapsed_child)
ref = ref->die_parent;
- assert (((!op_multifile && !rd_multifile && !fi_multifile)
- || cu != die_cu (ref))
- && (!op_multifile
- || cu->cu_chunk == die_cu (ref)->cu_chunk));
+ if (cu == die_cu (ref))
+ {
+ die->die_ck_state = CK_BAD;
+ return 0;
+ }
+ assert (!op_multifile
+ || cu->cu_chunk == die_cu (ref)->cu_chunk);
handled = true;
break;
}
next reply other threads:[~2019-03-07 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 Tom de Vries [this message]
2019-01-01 0:00 ` [committed][multi-file] Handle intra-CU DW_FORM_ref_addr reference Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190307073649.GA23184@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).