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

Bug#1020857: libc6: 2.35-1 breaks gdb on hppa



If I start gdb with /lib/ld.so.1, it runs okay with glibc 2.35-1:

dave@mx3210:~/debian/gdb/gdb-12.1$ /lib/ld.so.1 /usr/bin/gdb
GNU gdb (Debian 12.1-3) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) quit

dave@atlas:~/gnu/gdb/objdir$ /lib/ld.so.1 /usr/bin/gdb -c core /usr/bin/gdb
GNU gdb (Debian 12.1-3) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gdb...
Reading symbols from /usr/lib/debug/.build-id/26/0797847dd13b287f99df369368a8a943c3d2f3.debug...
[New LWP 3873]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/home/dave/gnu/glibc/objdir/nptl_db/libthread_db.so.1".
Core was generated by `gdb'.
--Type <RET> for more, q to quit, c to continue without paging--
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x4bc63f08 in ?? ()
(gdb) bt
#0  0x4bc63f08 in ?? ()
#1  0x006b5534 in operator new (sz=340)
    at /build/gdb-2W62n4/gdb-12.1/gdbsupport/new-op.cc:59
#2  0xf2ae4c00 in boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int) ()
   from /lib/hppa-linux-gnu/libboost_regex.so.1.74.0
#3  0xf4a98434 in ?? () from /lib/hppa-linux-gnu/libsource-highlight.so.4
#4  0xf773ae50 in call_init (env=0xf4b2f7dc, argv=0xf4b2f76c, argc=9790160,
    l=<optimized out>) at dl-init.c:70
#5  call_init (l=<optimized out>, argc=9790160, argv=0xf4b2f76c,
    env=0xf4b2f7dc) at dl-init.c:26
#6  0xf773af88 in _dl_init (main_map=0xf4b574c8, argc=-189597732, argv=0x0,
    env=0x9562d0) at dl-init.c:117
#7  0xf7750f9c in _dl_start_user () from /lib/ld.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

So, it looks like we die running array initializers:

  /* Next see whether there is an array with initialization functions.  */
  ElfW(Dyn) *init_array = l->l_info[DT_INIT_ARRAY];
  if (init_array != NULL)
    {
      unsigned int j;
      unsigned int jm;
      ElfW(Addr) *addrs;

      jm = l->l_info[DT_INIT_ARRAYSZ]->d_un.d_val / sizeof (ElfW(Addr));

      addrs = (ElfW(Addr) *) (init_array->d_un.d_ptr + l->l_addr);
      for (j = 0; j < jm; ++j)
        ((dl_init_t) addrs[j]) (argc, argv, env);
    }

Regards,
Dave Anglin

--
John David Anglin  dave.anglin@bell.net


Reply to: