ef157f6ece
- Change Version tag from 0.14rc1 to 0.14~rc1 * Rename dwz-0.14rc1.tar.xz to dwz-0.14~rc1.tar.xz - Fix testsuite build fail on riscv64: * dwz-testsuite-fix-pr25109.sh-on-riscv64.patch - Update reported dwz version * dwz-update-version.patch - DWZ 0.14-rc1 (master branch commit 0d391bf) update: * Dropped patches: - dwz-fix-assertion-off-cu_size-in-recompute_abbrevs.patch - dwz-fix-die-no-multifile-propagation.patch - dwz-fix-refd-NULL-assertion-in-write_die.patch - dwz-fix-reference-from-pu-to-cu.patch - dwz-fix-segfault-in-die_cu.patch - dwz-testsuite-adjust-pr24468-sh-test-case-for-readelf-with-follow-links.patch - dwz-testsuite-detect-when-devel-ignore-size-sh-is-unsupported.patch - dwz-testsuite-fix-partial-unit-grepping-in-pr24468-sh.patch - dwz-update-version-copyright-message.patch * Added patches: - dwz-add-assert-checking-that-cu-is-not-referenced-from-pu.patch - dwz-call-reorder_dups-asap.patch - dwz-document-experimental-status-of-odr.patch - dwz-enable-odr-by-default.patch - dwz-fix-reference-of-pu-to-cu-for-odr.patch - dwz-precompute-partitions.patch - dwz-update-suse-copyright-years.patch * Added BuildRequires gcc-c++ OBS-URL: https://build.opensuse.org/request/show/875368 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/dwz?expand=0&rev=34
29 lines
791 B
Diff
29 lines
791 B
Diff
Add assert checking that CU is not referenced from PU
|
|
|
|
One of the invariants of dwz is that references from a newly created PU can
|
|
only reference other PUs.
|
|
|
|
Add an assert that checks this.
|
|
|
|
2021-02-25 Tom de Vries <tdevries@suse.de>
|
|
|
|
* dwz.c (write_die): Add assert.
|
|
|
|
---
|
|
dwz.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/dwz.c b/dwz.c
|
|
index 89cf8d1..887bf24 100644
|
|
--- a/dwz.c
|
|
+++ b/dwz.c
|
|
@@ -12572,6 +12572,8 @@ write_die (unsigned char *ptr, dw_cu_ref cu, dw_die_ref die,
|
|
{
|
|
dw_cu_ref refdcu = die_cu (refd);
|
|
value = refd->u.p2.die_new_offset;
|
|
+ assert (IMPLIES (cu->cu_kind == CU_PU,
|
|
+ die_cu (refd)->cu_kind == CU_PU));
|
|
assert (value && refdcu->cu_kind != CU_ALT);
|
|
if (t->attr[j].form == DW_FORM_ref_addr)
|
|
{
|