public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "davidm at hpl dot hp dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/18743] New: crtbegin/crtend lacking unwind-info
Date: Tue, 30 Nov 2004 19:37:00 -0000	[thread overview]
Message-ID: <20041130193704.18743.davidm@hpl.hp.com> (raw)

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


             reply	other threads:[~2004-11-30 19:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30 19:37 davidm at hpl dot hp dot com [this message]
2004-11-30 19:48 ` [Bug target/18743] " pinskia at gcc dot gnu dot org
2004-11-30 19:51 ` pinskia at gcc dot gnu dot org
2004-11-30 20:01 ` davidm at hpl dot hp dot com
2004-11-30 20:03 ` davidm at hpl dot hp dot com
2004-11-30 20:09 ` [Bug target/18743] _init/_ " pinskia at gcc dot gnu dot org
2004-11-30 20:24 ` davidm at hpl dot hp dot com
2004-11-30 21:15 ` [Bug target/18743] _init/_fini " schwab at suse dot de
2005-07-02  1:45 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041130193704.18743.davidm@hpl.hp.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).