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: Thu, 08 Jul 2021 15:05:16 +0000	[thread overview]
Message-ID: <bug-28063-4717-QFfbgJxTLQ@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 #5 from Simon Marchi <simark at simark dot ca> ---
File gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101378

The question now (if this is confirmed to be a gcc bug) is how do we do handle
this bad debug info.  When getting a negative DW_AT_data_member_location, do we
just ignore the field, as if it didn't exist?  Do we add it, but with an
unknown location (a new FIELD_LOC_KIND_UNKNOWN)?

So far I have only seen this bug manifest when using std::unique_ptr (the
reproducer above), and the DW_AT_data_member_location should have always been 0
instead of -1.  So we could have a special case to detect
DW_AT_data_member_location, and make it 0 instead.  But I don't know if it will
always be right.

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

  parent reply	other threads:[~2021-07-08 15:05 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
2021-07-08  0:26 ` simark at simark dot ca
2021-07-08 15:05 ` simark at simark dot ca [this message]
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-QFfbgJxTLQ@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).