public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-28063-4717-Ted29tmY0H@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28063-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28063

--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
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 = -1

which comes from:

(top-gdb) p arg_type.main_type.name
$6 = 0x621001a80ae0 "std::_Head_base<1,
std::default_delete<private_thread_info>, true>"
(top-gdb) p arg_type.main_type.flds_bnds.fields[0].loc.bitpos 
$7 = -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]   
("/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<private_thread_info>")
                    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-07-07 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 16:27 [Bug gdb/28063] New: " simark at simark dot ca
2021-07-07 16:30 ` [Bug gdb/28063] " simark at simark dot ca
2021-07-07 16:33 ` simark at simark dot ca
2021-07-07 17:18 ` simark at simark dot ca [this message]
2021-07-08  0:26 ` simark at simark dot ca
2021-07-08 15:05 ` simark at simark dot ca
2021-07-25 16:41 ` ssbssa at sourceware dot org
2023-11-14 15:31 ` tromey at sourceware dot org
2024-01-05 14:53 ` ssbssa at sourceware dot org
2024-01-05 15:31 ` simon.marchi at polymtl dot ca

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=bug-28063-4717-Ted29tmY0H@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).