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

--- Comment #6 from Corentin Silva Pereira 
<corentin.silvapere...@4d-virtualiz.com> ---
Created attachment 15587
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15587&action=edit
Zip archive containing pngs of GDB view

Hi, I continued my investigation and i stumbled on something, i don't know if
it will help or even if it's related but here :

Program received signal SIGILL, Illegal instruction.
elf_link_add_object_symbols (abfd=0x55555a3c3050, info=0x55555580e1e0
<link_info>) at elflink.c:4408
4408                  old_ent = (char *) old_ent + htab->root.table.entsize;
(gdb) bt
#0  elf_link_add_object_symbols (abfd=0x55555a3c3050, info=0x55555580e1e0
<link_info>) at elflink.c:4408
#1  0x0000555555600650 in bfd_elf_link_add_symbols (abfd=0x55555a3c3050,
info=0x55555580e1e0 <link_info>) at elflink.c:5817
#2  0x000055555559c484 in load_symbols (place=<optimized out>,
entry=0x55555581a9a0) at ldlang.c:3098
#3  load_symbols (entry=0x55555581a9a0, place=<optimized out>) at ldlang.c:2959
#4  0x000055555559cebf in open_input_bfds (s=0x55555581a9a0,
mode=mode@entry=OPEN_BFD_NORMAL) at ldlang.c:3568
#5  0x000055555559f518 in lang_process () at ldlang.c:7649
#6  0x00005555555a32a7 in main (argc=225, argv=0x7fffffff9458) at
./ldmain.c:444
(gdb) print old_ent
$1 = (void *) 0x55555ab589f8
(gdb) print *old_ent
Attempt to dereference a generic pointer.
(gdb) print &old_ent
$2 = (void **) 0x7fffffff8e50
(gdb) print old_ent
$3 = (void *) 0x55555ab589f8
(gdb) print htab
$4 = (struct elf_link_hash_table *) 0x5555558303e0
(gdb) print htab->root
$5 = {table = {table = 0x55555a4ceaa0, newfunc = 0x5555555d9030
<_bfd_x86_elf_link_hash_newfunc>, memory = 0x555555830c10, size = 131071, count
= 75995, entsize = 176, frozen = 0}, undefs = 0x555555830fb0, 
  undefs_tail = 0x55555a30ed20, hash_table_free = 0x5555555d9180
<elf_x86_link_hash_table_free>, type = bfd_link_elf_hash_table}
(gdb) print (char*)old_ent
$6 = 0x55555ab589f8 ""
(gdb) print *htab
$7 = {root = {table = {table = 0x55555a4ceaa0, newfunc = 0x5555555d9030
<_bfd_x86_elf_link_hash_newfunc>, memory = 0x555555830c10, size = 131071, count
= 75995, entsize = 176, frozen = 0}, 
    undefs = 0x555555830fb0, undefs_tail = 0x55555a30ed20, hash_table_free =
0x5555555d9180 <elf_x86_link_hash_table_free>, type = bfd_link_elf_hash_table},
hash_table_id = X86_64_ELF_DATA, 
  dynamic_sections_created = 1, dynamic_relocs = 0, is_relocatable_executable =
0, dynobj = 0x55555583fb30, init_got_refcount = {refcount = 0, offset = 0,
glist = 0x0, plist = 0x0}, init_plt_refcount = {
    refcount = 0, offset = 0, glist = 0x0, plist = 0x0}, init_got_offset =
{refcount = -1, offset = 18446744073709551615, glist = 0xffffffffffffffff,
plist = 0xffffffffffffffff}, init_plt_offset = {
    refcount = -1, offset = 18446744073709551615, glist = 0xffffffffffffffff,
plist = 0xffffffffffffffff}, dynsymcount = 7643, local_dynsymcount = 0, dynstr
= 0x555555840ea0, strtabcount = 0, strtabsize = 0, 
  strtab = 0x0, bucketcount = 0, needed = 0x555558a7ba80, text_index_section =
0x0, data_index_section = 0x0, hgot = 0x555555830cf0, hplt = 0x0, hdynamic =
0x555555830c40, merge_info = 0x0, stab_info = {
    strings = 0x0, includes = {table = 0x0, newfunc = 0x0, memory = 0x0, size =
0, count = 0, entsize = 0, frozen = 0}, stabstr = 0x0}, eh_info = {hdr_sec =
0x0, array_count = 0, frame_hdr_is_compact = 0, u = {
      dwarf = {cies = 0x0, fde_count = 0, table = 0, array = 0x0}, compact =
{allocated_entries = 0, entries = 0x0}}}, dynlocal = 0x0, runpath =
0x555558ae8078, tls_sec = 0x0, tls_size = 0, 
  loaded = 0x55555a2ffce0, sgot = 0x5555558564f8, sgotplt = 0x555555856628,
srelgot = 0x5555558563c8, splt = 0x555555856168, srelplt = 0x555555856298,
sdynbss = 0x555555856758, srelbss = 0x0, 
  sdynrelro = 0x555555856888, sreldynrelro = 0x0, igotplt = 0x0, iplt = 0x0,
irelplt = 0x0, irelifunc = 0x0, dynsym = 0x555555842ac8}
(gdb) print htab->root.table.entsize
$8 = 176
(gdb) print p
$9 = (struct bfd_hash_entry *) 0x555556ed7e00
(gdb) print *p
$10 = {next = 0x0, string = 0x555556ef175e
"_ZN20Ui_TrajListParameter7setupUiEP7QWidget", hash = 883041719}
(gdb) print i
$11 = 16392
(gdb) print htab->root.table.size
$12 = 131071



I tried what Nick said about the fprintf, and the segfault didn't appear for
now, so quite a bit tricky to go on on this one but while i was re-testing
without fprintfs and within GDB, i had a sigill. In attachement there are some
screenshots of my gdb with assembly and registers layouts, maybe it will be
useful. My coworker and i, we suppose it should be working based on the
assembly, register and memory state so we don't really understand. We're kinda
guessing it could be the hardware, like a power outage that damaged my RAM or
something, but again, we're not sure.

Intel® Core™ i9-14900KF × 32
NVIDIA GeForce RTX 4070 SUPER
Corsair Vengeance DDR5(i think) 5600MHz 4*16Go RAM 


I'm gonna try with another version (more recent) of binutils to see if the
problem occurs too.

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

Reply via email to