From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FAC03854800; Wed, 20 Jan 2021 20:34:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FAC03854800 From: "jakub at redhat dot com" To: dwz@sourceware.org Subject: [Bug default/27213] alt_clear_dups: Assertion `child->die_dup == NULL' failed. Date: Wed, 20 Jan 2021 20:34:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 20:34:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27213 --- Comment #5 from Jakub Jelinek --- So: diff --git a/dwz.c b/dwz.c index 308bcba..a6ea5ec 100644 --- a/dwz.c +++ b/dwz.c @@ -3580,7 +3580,14 @@ checksum_die (DSO *dso, dw_cu_ref cu, dw_die_ref top_die, dw_die_ref die) ptr +=3D ptr_size; break; case DW_FORM_flag_present: + break; case DW_FORM_implicit_const: + if (!handled && die->die_ck_state !=3D CK_BAD) + { + handled =3D true; + die->u.p1.die_hash + =3D iterative_hash_object (t->values[i], die->u.p1.die_hash= ); + } break; case DW_FORM_flag: case DW_FORM_data1: @@ -4837,7 +4844,11 @@ die_eq_1 (dw_cu_ref cu1, dw_cu_ref cu2, ptr2 +=3D ptr_size; break; case DW_FORM_flag_present: + break; case DW_FORM_implicit_const: + if ((!ignore_locus || old_ptr1) + && t1->values[i] !=3D t2->values[j]) + FAIL; break; case DW_FORM_flag: case DW_FORM_data1: @@ -10456,19 +10467,18 @@ build_abbrevs_for_die (htab_t h, dw_cu_ref cu, dw_die_ref die, case DW_FORM_data4: value =3D read_32 (ptr); break; case DW_FORM_data8: value =3D read_64 (ptr); break; case DW_FORM_udata: value =3D read_uleb128 (ptr); break; - case DW_FORM_implicit_const: break; + case DW_FORM_implicit_const: + value =3D reft->values[i]; + break; default: error (0, 0, "Unhandled %s for %s", get_DW_FORM_str (form), get_DW_AT_str (reft->attr[i].attr)); return 1; } - /* Note that the value is only used for calculating the - DIE size and possibly change form. Doesn't change the - implicit_const from or value. */ + value =3D line_htab_lookup (refcu, value); if (form !=3D DW_FORM_implicit_const) { - value =3D line_htab_lookup (refcu, value); if (value <=3D 0xff) { form =3D DW_FORM_data1; @@ -10488,7 +10498,7 @@ build_abbrevs_for_die (htab_t h, dw_cu_ref cu, dw_die_ref die, t->attr[j].attr =3D reft->attr[i].attr; t->attr[j].form =3D form; if (form =3D=3D DW_FORM_implicit_const) - t->values[j] =3D reft->values[i]; + t->values[j] =3D value; j++; continue; } @@ -12088,10 +12098,8 @@ write_die (unsigned char *ptr, dw_cu_ref cu, dw_die_ref die, update =3D true; break; case DW_FORM_implicit_const: - /* Negative means, already transformed. */ - if (reft->values[i] >=3D 0) - update =3D true; - value =3D reft->values[i]; + /* DW_FORM_implicit_const should have been updated + already when computing abbrevs. */ break; default: abort (); } @@ -12104,9 +12112,6 @@ write_die (unsigned char *ptr, dw_cu_ref cu, dw_die= _ref die, case DW_FORM_data2: write_16 (ptr, value); break; case DW_FORM_data4: write_32 (ptr, value); break; case DW_FORM_udata: write_uleb128 (ptr, value); break; - case DW_FORM_implicit_const: - reft->values[i] =3D -value; /* Note, negated. */ - break; default: abort (); } } as the full patch? --=20 You are receiving this mail because: You are on the CC list for the bug.=