https://sourceware.org/bugzilla/show_bug.cgi?id=25355
Martin Liška <marxin.liska at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #48 from Martin Liška <marxin.liska at gmail dot com> --- Ok, I've just packaged the 2.34 release branch with the backport of this issue. However, I see the following Invalid free: $ touch a.c && gcc -c -flto a.c -o a.o $ touch a.c && gcc -c -flto a.c -o b.o $ ar r libconsole.a a.o b.o ar: creating libconsole.a bfd plugin: could not unlink output file free(): invalid pointer Aborted (core dumped) $ valgrind ar r libconsole.a a.o b.o ==17300== Memcheck, a memory error detector ==17300== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==17300== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==17300== Command: ar r libconsole.a a.o b.o ==17300== ==17300== Invalid free() / delete / delete[] / realloc() ==17300== at 0x4839D7B: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17300== by 0x4B71929: xrealloc (xmalloc.c:179) ==17300== by 0x485B1B2: ??? (in /usr/lib64/gcc/x86_64-suse-linux/9/liblto_plugin.so.0.0.0) ==17300== by 0x4B5E338: try_claim (plugin.c:565) ==17300== by 0x4B5E338: try_load_plugin (plugin.c:723) ==17300== by 0x4B5E91B: load_plugin (plugin.c:855) ==17300== by 0x4B5E91B: bfd_plugin_object_p (plugin.c:868) ==17300== by 0x49857F5: bfd_check_format_matches (format.c:261) ==17300== by 0x497E5FC: _bfd_compute_and_write_armap (archive.c:2283) ==17300== by 0x497EF0B: _bfd_write_archive_contents (archive.c:2147) ==17300== by 0x498CE09: bfd_close (opncls.c:755) ==17300== by 0x10E45F: write_archive (ar.c:1240) ==17300== by 0x10F0CB: replace_members (ar.c:1482) ==17300== by 0x10BF4C: main (ar.c:887) ==17300== Address 0x4f568b0 is 0 bytes inside a block of size 8 free'd ==17300== at 0x48389AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17300== by 0x485ABC3: ??? (in /usr/lib64/gcc/x86_64-suse-linux/9/liblto_plugin.so.0.0.0) ==17300== by 0x4B5E362: try_claim (plugin.c:574) ==17300== by 0x4B5E362: try_load_plugin (plugin.c:723) ==17300== by 0x4B5E91B: load_plugin (plugin.c:855) ==17300== by 0x4B5E91B: bfd_plugin_object_p (plugin.c:868) ==17300== by 0x49857F5: bfd_check_format_matches (format.c:261) ==17300== by 0x497EA17: _bfd_write_archive_contents (archive.c:2127) ==17300== by 0x498CE09: bfd_close (opncls.c:755) ==17300== by 0x10E45F: write_archive (ar.c:1240) ==17300== by 0x10F0CB: replace_members (ar.c:1482) ==17300== by 0x10BF4C: main (ar.c:887) ==17300== Block was alloc'd at ==17300== at 0x483777F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17300== by 0x4B7193F: xrealloc (xmalloc.c:177) ==17300== by 0x485B1B2: ??? (in /usr/lib64/gcc/x86_64-suse-linux/9/liblto_plugin.so.0.0.0) ==17300== by 0x4B5E338: try_claim (plugin.c:565) ==17300== by 0x4B5E338: try_load_plugin (plugin.c:723) ==17300== by 0x4B5E91B: load_plugin (plugin.c:855) ==17300== by 0x4B5E91B: bfd_plugin_object_p (plugin.c:868) ==17300== by 0x49857F5: bfd_check_format_matches (format.c:261) ==17300== by 0x497EA17: _bfd_write_archive_contents (archive.c:2127) ==17300== by 0x498CE09: bfd_close (opncls.c:755) ==17300== by 0x10E45F: write_archive (ar.c:1240) ==17300== by 0x10F0CB: replace_members (ar.c:1482) ==17300== by 0x10BF4C: main (ar.c:887) ==17300== ar: out of memory allocating 16 bytes after a total of 0 bytes -- You are receiving this mail because: You are on the CC list for the bug.