This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/18743] New: crtbegin/crtend lacking unwind-info


The Gtest-init test from libunwind is currently failing on x86-64 because there
is  incomplete/no unwind info for _init.  For example, calling backtrace() from
a C++ constructor yields this truncated stack-trace:

[0] ip=0x400afb
[1] ip=0x400e26

with libunwind, it gets a bit further, but crashes eventually:

  [400b25] <_Z1bv+0x55>
  [400e26] <__do_global_ctors_aux+0x26>
  [4008f3] <_init+0x13>
  [48f0246c8948f824] <>

For reference, the complete backtrace, obtained via gdb, ought to be like this:

  0x0000000000400b25 in b ()
  0x0000000000400e26 in __do_global_ctors_aux ()
  0x00000000004008f3 in _init ()
  0x0000000000400d20 in Test_Class::Test_Class ()
  0x0000000000400d91 in __libc_csu_init () at elf-init.c:60
  0x0000002a95bffa45 in __libc_start_main () from /lib64/tls/libc.so.6
  0x0000000000400a1a in _start () at ../sysdeps/x86_64/elf/start.S:96

I suspect the platform should be switched to using .init_array/.fini_array
as is done on ia64 already (probably the same applies for all platforms that
support .init_array/.fini_array).

-- 
           Summary: crtbegin/crtend lacking unwind-info
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davidm at hpl dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-suse-linux
  GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18743


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]