bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25355] nm reports data variable as "T" with -flto


From: marxin.liska at gmail dot com
Subject: [Bug binutils/25355] nm reports data variable as "T" with -flto
Date: Tue, 11 Feb 2020 11:46:45 +0000

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 #19 from Martin Liška <marxin.liska at gmail dot com> ---
Thank you H.J. but I see the following memory corruption with the patch
applied:

$ valgrind ~/bin/binutils/bin/nm --plugin
/usr/bin/../bin/../lib/bfd-plugins/liblto_plugin.so.0.0.0 x.o
...
==28080== Invalid read of size 8
==28080==    at 0x48A55D: bfd_plugin_canonicalize_symtab (plugin.c:860)
==28080==    by 0x4123C4: _bfd_generic_read_minisymbols (syms.c:826)
==28080==    by 0x4039A9: display_rel_file (nm.c:1112)
==28080==    by 0x4043DA: display_file (nm.c:1379)
==28080==    by 0x402B64: main (nm.c:1860)
==28080==  Address 0x4a81498 is 1,704 bytes inside a block of size 4,064 free'd
==28080==    at 0x48389AB: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28080==    by 0x4ACCF2: objalloc_free (objalloc.c:187)
==28080==    by 0x40FAB2: _bfd_delete_bfd (opncls.c:126)
==28080==    by 0x41067B: bfd_close_all_done (opncls.c:797)
==28080==    by 0x41067B: bfd_close_all_done (opncls.c:785)
==28080==    by 0x48A236: add_input_file (plugin.c:315)
==28080==    by 0x485B1D1: ??? (in
/usr/lib64/gcc/x86_64-suse-linux/9/liblto_plugin.so.0.0.0)
==28080==    by 0x48A8FB: try_claim (plugin.c:417)
==28080==    by 0x48A8FB: try_load_plugin (plugin.c:562)
==28080==    by 0x48AF4C: load_plugin (plugin.c:637)
==28080==    by 0x48AF4C: bfd_plugin_object_p (plugin.c:704)
==28080==    by 0x40DE35: bfd_check_format_matches (format.c:261)
==28080==    by 0x4043B1: display_file (nm.c:1375)
==28080==    by 0x402B64: main (nm.c:1860)
==28080==  Block was alloc'd at
==28080==    at 0x483777F: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28080==    by 0x4ACC2B: _objalloc_alloc (objalloc.c:159)
==28080==    by 0x410990: bfd_alloc (opncls.c:978)
==28080==    by 0x410E29: bfd_zalloc (opncls.c:1027)
==28080==    by 0x42C679: _bfd_elf_new_section_hook (elf.c:2902)
==28080==    by 0x41148E: bfd_section_init (section.c:825)
==28080==    by 0x42B46B: _bfd_elf_make_section_from_shdr (elf.c:1035)
==28080==    by 0x42B46B: _bfd_elf_make_section_from_shdr (elf.c:1023)
==28080==    by 0x42A9A0: bfd_section_from_shdr (elf.c:2586)
==28080==    by 0x4261DB: bfd_elf64_object_p (elfcode.h:815)
==28080==    by 0x40DC89: bfd_check_format_matches (format.c:328)
==28080==    by 0x48A1E3: add_input_file (plugin.c:300)
==28080==    by 0x485B1D1: ??? (in
/usr/lib64/gcc/x86_64-suse-linux/9/liblto_plugin.so.0.0.0)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]