From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF3693943550; Mon, 3 May 2021 22:13:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF3693943550 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27817] AddressSanitizer: new-delete-type-mismatch (new signatured_type) Date: Mon, 03 May 2021 22:13:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2021 22:13:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27817 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca, | |tromey at sourceware dot o= rg --- Comment #1 from Tom de Vries --- Hmm, so we allocate a signatured_type: ... auto sig_type =3D per_objfile->per_bfd->allocate_signatured_type = (); ... which we then move to: ... std::unique_ptr this_cu; ... this_cu =3D std::move (sig_type); ... and store it: ... per_objfile->per_bfd->all_comp_units.push_back (std::move (this_cu)); ... Then when dwarf2_per_bfd::~dwarf2_per_bfd() is called, it also invokes the destructor for: ... std::vector> all_comp_units; ... and the item is deallocated with a dwarf2_per_cu_data type instead of a signatured_type. --=20 You are receiving this mail because: You are on the CC list for the bug.=