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

            Bug ID: 33127
           Summary: 'FAIL: Link eh-group.o to eh-group' (assertion fail
                    elf-sframe.c:122) with default-enabled SFrames
           Product: binutils
           Version: 2.45 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libsframe
          Assignee: indu.bhagat at oracle dot com
          Reporter: sam at gentoo dot org
  Target Milestone: ---

Hit this when playing with enabling SFrames by default in gas.

```
$ ./test.sh
+ BINUTILS=/home/sam/git/binutils-gdb
+ cd /home/sam/git/binutils-gdb/ld
+ /home/sam/git/binutils-gdb/ld/../gas/as-new
-I/home/sam/git/binutils-gdb/ld/testsuite/ld-elf -o tmpdir/eh-group1size.o
/home/sam/git/binutils-gdb/ld/testsuite/ld-elf/eh-group1.s
+ /home/sam/git/binutils-gdb/ld/../gas/as-new
-I/home/sam/git/binutils-gdb/ld/testsuite/ld-elf -o tmpdir/eh-group1.o --defsym
ELF64=1 /home/sam/git/binutils-gdb/ld/testsuite/ld-elf/eh-group1.s
+ /home/sam/git/binutils-gdb/ld/../gas/as-new
-I/home/sam/git/binutils-gdb/ld/testsuite/ld-elf -o tmpdir/eh-group2.o --defsym
ELF64=1 /home/sam/git/binutils-gdb/ld/testsuite/ld-elf/eh-group2.s
+ ./ld-new -o tmpdir/eh-group.o -z norelro -z nomemory-seal
-L/home/sam/git/binutils-gdb/ld/testsuite/ld-elf -r tmpdir/eh-group1.o
tmpdir/eh-group2.o
+ ./ld-new -o tmpdir/eh-group -e _start tmpdir/eh-group.o
./ld-new: BFD (GNU Binutils) 2.44.50.20250703 assertion fail elf-sframe.c:122
```

```
$ gdb --args ./ld-new   -o tmpdir/eh-group -e _start tmpdir/eh-group.o
Reading symbols from ./ld-new...
(gdb) b elf-sframe.c:122
Breakpoint 1 at 0xa66cc: file elf-sframe.c, line 122.
(gdb) r
Starting program: /home/sam/git/binutils-gdb/ld/ld-new -o tmpdir/eh-group -e
_start tmpdir/eh-group.o
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".

Breakpoint 1, sframe_decoder_init_func_bfdinfo (abfd=0x55555586e5b0,
sec=0x555555871070, sfd_info=<optimized out>, cookie=0x7fffffffd4e0) at
elf-sframe.c:122
122       BFD_ASSERT (cookie->rels + fde_count == cookie->relend);
(gdb) bt
#0  sframe_decoder_init_func_bfdinfo (abfd=0x55555586e5b0, sec=0x555555871070,
sfd_info=<optimized out>, cookie=0x7fffffffd4e0) at elf-sframe.c:122
#1  _bfd_elf_parse_sframe (abfd=abfd@entry=0x55555586e5b0,
info=info@entry=0x5555558393c0 <link_info>, sec=sec@entry=0x555555871070,
cookie=cookie@entry=0x7fffffffd4e0)
    at elf-sframe.c:225
#2  0x00005555555f26d5 in bfd_elf_discard_info (output_bfd=0x555555842070,
info=0x5555558393c0 <link_info>) at elflink.c:15293
#3  0x0000555555581467 in gldelf_x86_64_after_allocation () at
eelf_x86_64.c:179
#4  0x000055555556ef65 in lang_process () at ldlang.c:8641
#5  0x0000555555555d12 in main (argc=<optimized out>, argv=<optimized out>) at
./ldmain.c:882
```

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

Reply via email to