From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>, 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 12:52:38 -0400 [thread overview]
Message-ID: <ef85c56b-9407-3258-759c-10fc2cba579d@polymtl.ca> (raw)
In-Reply-To: <d1a201b9-d95f-2cc8-86cd-a7826a1b9dd9@redhat.com>
On 2020-04-16 12:27 p.m., Pedro Alves wrote:
> 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.
Hmm yes, that's right, I'll fix it.
Simon
next prev parent reply other threads:[~2020-04-16 16:52 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
2020-04-16 16:52 ` Simon Marchi [this message]
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=ef85c56b-9407-3258-759c-10fc2cba579d@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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