From: Simon Marchi <simon.marchi@polymtl.ca>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb/dwarf: turn some errors into asserts
Date: Mon, 2 Feb 2026 13:15:01 -0500 [thread overview]
Message-ID: <f5df255b-6e89-4fdf-a545-24b5aa5c91c6@polymtl.ca> (raw)
In-Reply-To: <20260202104218.7aa08244@f42-mesa-1>
On 2026-02-02 12:42, Kevin Buettner wrote:
> On Mon, 26 Jan 2026 12:01:17 -0500
> Simon Marchi <simon.marchi@efficios.com> wrote:
>
>> From: Simon Marchi <simon.marchi@efficios.com>
>> To: gdb-patches@sourceware.org
>> Cc: Simon Marchi <simon.marchi@polymtl.ca>
>> Subject: [PATCH] gdb/dwarf: turn some errors into asserts
>> Date: Mon, 26 Jan 2026 12:01:17 -0500
>>
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> There are some nullptr checks on the return value of load_cu that I
>> think can't possibly ever be true. load_cu returns nullptr only if the
>> CU is "dummy". A "dummy" CU is one that has a header but no DIE. The
>> body (the part after the header, included in the unit reported by the
>> header) is either empty or consists only of zeroes (null entries).
>>
>> In the various spots I modified we are doing some work (e.g. evaluating an
>> expression) in the context of PER_CU, so PER_CU can't possibly be empty
>> / dummy.
>>
>> Change those conditions to asserts. No behavior change expected, unless
>> my reasoning is incorrect.
>
> I agree with your reasoning.
>
> Approved-by: Kevin Buettner <kevinb@redhat.com>
>
Pushed, thanks!
Simon
prev parent reply other threads:[~2026-02-02 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 17:01 Simon Marchi
2026-02-02 17:42 ` Kevin Buettner
2026-02-02 18:15 ` Simon Marchi [this message]
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=f5df255b-6e89-4fdf-a545-24b5aa5c91c6@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=simon.marchi@efficios.com \
/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