From: Tom Tromey <tom@tromey.com>
To: simon.marchi@polymtl.ca
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/dwarf: fix reading DW_FORM_addrx with address size of 2
Date: Fri, 18 Sep 2026 11:15:47 -0600 [thread overview]
Message-ID: <87eceqv5to.fsf@tromey.com> (raw)
In-Reply-To: <20260916014513.3386344-1-simon.marchi@polymtl.ca> (simon marchi's message of "Tue, 15 Sep 2026 21:45:10 -0400")
>>>>> simon marchi <simon.marchi@polymtl.ca> writes:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> While investigating AVR binaries for bug 34638, I stumbled on a crash of
> GDB when loading an AVR binary generated by clang:
Thanks.
> + /* Check that the whole entry fits inside the section. */
> + if (addr_base_or_zero + (addr_index + 1) * (ULONGEST) addr_size
> + > per_bfd->addr.size)
The cast to ULONGEST seems weird to me, especially since it isn't
repeated later:
> + const gdb_byte *info_ptr
> + = per_bfd->addr.buffer + addr_base_or_zero + addr_index * addr_size;
I'd suggest removing the cast.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2026-09-18 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 1:45 simon.marchi
2026-09-18 17:15 ` Tom Tromey [this message]
2026-09-21 14:41 ` Simon Marchi
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=87eceqv5to.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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