pe_ILF_object_p and bfd_check_format_matches
Martin Liška
mliska@suse.cz
Thu Apr 13 09:55:10 GMT 2023
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)
==27734== by 0x495F2F4: bfd_open_file (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x4B86557: bfd_plugin_open_input (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x4B8674F: try_load_plugin (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x4B86A5B: bfd_plugin_object_p.lto_priv.0 (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x49626EA: bfd_check_format_matches (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x4963016: _bfd_write_archive_contents (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x4968DD5: bfd_close (in /usr/lib64/libbfd-2.40.50.20230412-797.so)
==27734== by 0x10E9BB: write_archive (in /usr/bin/ar)
==27734== by 0x1103DD: main (in /usr/bin/ar)
==27734== Address 0x0 is not stack'd, malloc'd or (recently) free'd
Martin
More information about the Binutils
mailing list