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, 18 Feb 2020 15:15:41 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25355

--- Comment #54 from Martin Liška <marxin.liska at gmail dot com> ---
However, I see one another segfault:

$ cat 1.i
int a;
$ cat 2.i
[empty file]
$ gcc -flto=auto -O2 -fPIC 1.i -c
$ gcc -flto=auto -O2 -fPIC 2.i -c
$ ar cru x.a 1.o 2.o
$ ranlib x.a
Segmentation fault (core dumped)

$ valgrind ranlib x.a
==423== Memcheck, a memory error detector
==423== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==423== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==423== Command: ranlib x.a
==423== 
==423== Invalid read of size 1
==423==    at 0x498CDF1: bfd_close (opncls.c:753)
==423==    by 0x4B5D76D: bfd_plugin_close_and_cleanup (plugin.c:1074)
==423==    by 0x498CD2A: bfd_close_all_done (opncls.c:789)
==423==    by 0x497C31F: archive_close_worker (archive.c:2788)
==423==    by 0x4B6F38E: htab_traverse_noresize (hashtab.c:775)
==423==    by 0x497F9A4: _bfd_archive_close_and_cleanup (archive.c:2835)
==423==    by 0x498CD2A: bfd_close_all_done (opncls.c:789)
==423==    by 0x10CA11: write_archive (ar.c:1247)
==423==    by 0x10DBA1: ranlib_only.part.0 (ar.c:1498)
==423==    by 0x10BCF1: ranlib_only (ar.c:1492)
==423==    by 0x10BCF1: ranlib_main (ar.c:695)
==423==    by 0x10BCF1: main (ar.c:759)
==423==  Address 0x4f57644 is 68 bytes inside a block of size 280 free'd
==423==    at 0x48389AB: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==423==    by 0x498CD4E: bfd_close_all_done (opncls.c:797)
==423==    by 0x498CD4E: bfd_close_all_done (opncls.c:785)
==423==    by 0x4B5D76D: bfd_plugin_close_and_cleanup (plugin.c:1074)
==423==    by 0x498CD2A: bfd_close_all_done (opncls.c:789)
==423==    by 0x497C31F: archive_close_worker (archive.c:2788)
==423==    by 0x4B6F38E: htab_traverse_noresize (hashtab.c:775)
==423==    by 0x497F9A4: _bfd_archive_close_and_cleanup (archive.c:2835)
==423==    by 0x498CD2A: bfd_close_all_done (opncls.c:789)
==423==    by 0x10CA11: write_archive (ar.c:1247)
==423==    by 0x10DBA1: ranlib_only.part.0 (ar.c:1498)
==423==    by 0x10BCF1: ranlib_only (ar.c:1492)
==423==    by 0x10BCF1: ranlib_main (ar.c:695)
==423==    by 0x10BCF1: main (ar.c:759)
==423==  Block was alloc'd at
==423==    at 0x483777F: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==423==    by 0x4986A41: bfd_malloc (libbfd.c:275)
==423==    by 0x4986BD9: bfd_zmalloc (libbfd.c:360)
==423==    by 0x498C72B: _bfd_new_bfd (opncls.c:62)
==423==    by 0x498C917: bfd_fopen (opncls.c:200)
==423==    by 0x4B5D7B4: add_input_file (plugin.c:389)
==423==    by 0x52E01D1: ???
==423==    by 0x4B5E3C3: try_claim (plugin.c:564)
==423==    by 0x4B5E3C3: try_load_plugin (plugin.c:710)
==423==    by 0x4B5E8EB: load_plugin (plugin.c:848)
==423==    by 0x4B5E8EB: bfd_plugin_object_p (plugin.c:861)
==423==    by 0x49857F5: bfd_check_format_matches (format.c:261)
==423==    by 0x497EA17: _bfd_write_archive_contents (archive.c:2127)
==423==    by 0x498CE09: bfd_close (opncls.c:755)

-- 
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]