From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: make is_linked_with_cygwin_dll handle import table not at beginning of .idata section
Date: Thu, 16 Apr 2020 17:27:40 +0100 [thread overview]
Message-ID: <d1a201b9-d95f-2cc8-86cd-a7826a1b9dd9@redhat.com> (raw)
In-Reply-To: <20200416154508.168585-1-simon.marchi@polymtl.ca>
On 4/16/20 4:45 PM, Simon Marchi via Gdb-patches wrote:
> + /* The section's virtual address as reported by BFD has the image base applied,
> + remove it. */
> + gdb_assert (idata_section_va >= pe_extra->ImageBase);
> + idata_section_va -= pe_extra->ImageBase;
> +
> + /* Assert that the import table is indeed within the .idata section's range. */
> + gdb_assert (import_table_va >= idata_section_va);
> + gdb_assert (import_table_va < (idata_section_va + idata_section_size));
Couldn't these be triggered with malformed files? I.e., seems like an assertion
is too strong, and we should maybe warn and return false instead.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2020-04-16 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 15:45 Simon Marchi
2020-04-16 16:27 ` Pedro Alves [this message]
2020-04-16 16:52 ` Simon Marchi
2020-04-16 18:47 ` [PATCH v2 1/2] " Simon Marchi
2020-04-16 18:47 ` [PATCH v2 2/2] gdb: is_linked_with_cygwin_dll: mention filename in warning messages Simon Marchi
2020-04-16 19:21 ` [PATCH v2 1/2] gdb: make is_linked_with_cygwin_dll handle import table not at beginning of .idata section Pedro Alves
2020-04-16 19:47 ` 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=d1a201b9-d95f-2cc8-86cd-a7826a1b9dd9@redhat.com \
--to=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).