Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-14550

gdb crashes with simple program execution in dl_main

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • CentOS Stream 8
    • gdb
    • None
    • None
    • Critical
    • None
    • None
    • .NET Core, Azure Red Hat Openshift, Camel Extensions for Quarkus, Camel K
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

       

      Debug a simple program using gdb

      Please provide the package NVR for which bug is seen:

      gdb.x86_64                         8.2-20.el8                         @appstream

      gcc version 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC) 

      Linux localhost.localdomain 4.18.0-517.el8.x86_64 #1 SMP Wed Oct 11 00:24:54 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

      How reproducible:

      100%

      Steps to reproduce

      1. Create hello world program

      [root@localhost alex]# cat hw.c
      #include <stdio.h>

      int main()

      {   printf("Hi\n"); }
      1. cc -g -o hw hw.c
      2. gdb ./hw
      3. run

      Expected results

      The program runs to completion

      Actual results

      Sigsegv in dl_main

      starting program: /home/alex/hw

      Program received signal SIGSEGV, Segmentation fault.
      0x0000ffffef7c6729 in ?? ()
      (gdb) bt
      #0  0x0000ffffef7c6729 in ?? ()
      #1  0x00007ffff7dee91a in dl_main (phdr=<optimized out>, 
          phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>)
          at rtld.c:1881
      #2  0x00007ffff7deb313 in _dl_sysdep_start (
          start_argptr=start_argptr@entry=0x7fffffffe320, 
          dl_main=dl_main@entry=0x7ffff7ded050 <dl_main>) at ../elf/dl-sysdep.c:256
      #3  0x00007ffff7decc0b in _dl_start_final (arg=0x7fffffffe320) at rtld.c:490
      #4  _dl_start (arg=0x7fffffffe320) at rtld.c:583
      #5  0x00007ffff7debcb8 in _start () from /lib64/ld-linux-x86-64.so.2
      #6  0x0000000000000001 in ?? ()
      #7  0x00007fffffffe5a0 in ?? ()
      #8  0x0000000000000000 in ?? ()

              Unassigned Unassigned
              madmanal987 LXA Levin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: