From: "Martin Liška" <mliska@suse.cz>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: pe_ILF_object_p and bfd_check_format_matches
Date: Thu, 13 Apr 2023 14:53:48 +0200 [thread overview]
Message-ID: <aaa9ce69-69bd-dfb7-4245-98ba8d6f9f5c@suse.cz> (raw)
In-Reply-To: <ZDfgc6h0ldWA/l7a@squeak.grove.modra.org>
On 4/13/23 12:58, Alan Modra wrote:
> On Thu, Apr 13, 2023 at 11:55:10AM +0200, Martin Liška wrote:
>> On 4/13/23 04:58, Alan Modra via Binutils wrote:
>>> |The last patch wasn't quite correct.|
>>
>> Heh, I've just noticed that this change caused a crash when ar is called for ~150 files:
>>
>> ==27734== Invalid read of size 4
>> ==27734== at 0x4D576DD: ftello (in /usr/lib64/libc.so.6)
>> ==27734== by 0x4958E18: close_one (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
>
> Yes, that will be this part:
>>> It is also not correct to restore abfd->iostream unless the iovec
>>> changes. abfd->iostream is a FILE* when using cache_iovec, and if
>>> the file has been closed and reopened the iostream may have changed.
>
> I saw a similar invalid read in fseeko, and a double free in fclose
> due to the above.
>
Good, I can confirm the problem is gone with your latest change.
Thanks,
Martin
prev parent reply other threads:[~2023-04-13 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 1:32 Alan Modra
2023-04-13 2:58 ` Alan Modra
2023-04-13 9:55 ` Martin Liška
2023-04-13 10:58 ` Alan Modra
2023-04-13 12:53 ` Martin Liška [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=aaa9ce69-69bd-dfb7-4245-98ba8d6f9f5c@suse.cz \
--to=mliska@suse.cz \
--cc=amodra@gmail.com \
--cc=binutils@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).