From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7CD63854807; Wed, 7 Jul 2021 17:18:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7CD63854807 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/28063] ASan crash in value_primitive_field / value_contents_copy_raw when printing std::tuple Date: Wed, 07 Jul 2021 17:18:59 +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: simark at simark dot ca 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: 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: Wed, 07 Jul 2021 17:18:59 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28063 --- Comment #3 from Simon Marchi --- And the gcc version: $ gcc --version gcc (GCC) 11.1.0 If we look at the value_primitive_field frame, I see: (top-gdb) p offset $5 =3D -1 which comes from: (top-gdb) p arg_type.main_type.name $6 =3D 0x621001a80ae0 "std::_Head_base<1, std::default_delete, true>" (top-gdb) p arg_type.main_type.flds_bnds.fields[0].loc.bitpos=20 $7 =3D -8 And indeed, in the DWARF, in the gdb file, I have: 0x000cbdf5: DW_TAG_member DW_AT_name [DW_FORM_strp] ("_M_head_impl") DW_AT_decl_file [DW_FORM_implicit_const]=20=20=20 ("/usr/include/c++/11.1.0/tuple") DW_AT_decl_line [DW_FORM_implicit_const] (125) DW_AT_decl_column [DW_FORM_implicit_const] (39) DW_AT_type [DW_FORM_ref4] (0x000cbaff "default_delete") DW_AT_data_member_location [DW_FORM_implicit_const] (-1) I don't know if the DW_AT_data_member_location value of -1 is right or not. --=20 You are receiving this mail because: You are on the CC list for the bug.=