public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: aaronw@net.com
To: gcc-gnats@gcc.gnu.org
Subject: target/8004: All C++ binaries crash in __register_frame_info_bases on Sparc Solaris 2.7
Date: Sun, 22 Sep 2002 10:56:00 -0000	[thread overview]
Message-ID: <20020922175041.5784.qmail@sources.redhat.com> (raw)


>Number:         8004
>Category:       target
>Synopsis:       All C++ binaries crash in __register_frame_info_bases on Sparc Solaris 2.7
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 22 10:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Aaron Williams
>Release:        3.2
>Organization:
>Environment:
Sparc Sun Solaris 2.7 --disable-multilib (32-bit only)
>Description:
All binaries appear to crash in __register_frame_info_bases.

Here is the gdb info:

0xff2b5ffc <__register_frame_info_bases>:       save  %sp, -112, %sp
0xff2b6000 <__register_frame_info_bases+4>:     sethi  %hi(0), %o0
0xff2b6004 <__register_frame_info_bases+8>:     sethi  %hi(0x11400), %l7
0xff2b6008 <__register_frame_info_bases+12>:
    call  0xff2b5e38 <base_of_encoded_value+176>
0xff2b600c <__register_frame_info_bases+16>:
    add  %l7, 0x1ac, %l7        ! 0x115ac <_start+32>
0xff2b6010 <__register_frame_info_bases+20>:    or  %o0, 0x84, %o0
0xff2b6014 <__register_frame_info_bases+24>:    sethi  %hi(0), %o1
0xff2b6018 <__register_frame_info_bases+28>:    ld  [ %l7 + %o0 ], %l1
0xff2b601c <__register_frame_info_bases+32>:    or  %o1, 0x88, %o1
0xff2b6020 <__register_frame_info_bases+36>:    ld  [ %l7 + %o1 ], %l0
0xff2b6024 <__register_frame_info_bases+40>:    ld  [ %l1 ], %o2
0xff2b6028 <__register_frame_info_bases+44>:    mov  -1, %o1
0xff2b602c <__register_frame_info_bases+48>:    st  %o1, [ %i1 ]
0xff2b6030 <__register_frame_info_bases+52>:    sethi  %hi(0x1fe00000), %o1
0xff2b6034 <__register_frame_info_bases+56>:    mov  %l0, %o0
0xff2b6038 <__register_frame_info_bases+60>:    st  %i2, [ %i1 + 4 ]
0xff2b603c <__register_frame_info_bases+64>:    st  %i3, [ %i1 + 8 ]
0xff2b6040 <__register_frame_info_bases+68>:    st  %i0, [ %i1 + 0xc ]
0xff2b6044 <__register_frame_info_bases+72>:    cmp  %o2, 0
0xff2b6048 <__register_frame_info_bases+76>:
    be  0xff2b6058 <__register_frame_info_bases+92>
0xff2b604c <__register_frame_info_bases+80>:    st  %o1, [ %i1 + 0x10 ]
0xff2b6050 <__register_frame_info_bases+84>:
    call  0xff2c7818 <_PROCEDURE_LINKAGE_TABLE_+432>
0xff2b6054 <__register_frame_info_bases+88>:    nop
0xff2b6058 <__register_frame_info_bases+92>:    sethi  %hi(0), %o1
0xff2b605c <__register_frame_info_bases+96>:    or  %o1, 0x8c, %o1      ! 0x8c
0xff2b6060 <__register_frame_info_bases+100>:   ld  [ %l7 + %o1 ], %o2
0xff2b6064 <__register_frame_info_bases+104>:   mov  %l0, %o0
0xff2b6068 <__register_frame_info_bases+108>:   ld  [ %l1 ], %o3
0xff2b606c <__register_frame_info_bases+112>:   ld  [ %o2 ], %o1
0xff2b6070 <__register_frame_info_bases+116>:   cmp  %o3, 0
0xff2b6074 <__register_frame_info_bases+120>:   st  %o1, [ %i1 + 0x14 ]
0xff2b6078 <__register_frame_info_bases+124>:
    be  0xff2b6088 <__register_frame_info_bases+140>
0xff2b607c <__register_frame_info_bases+128>:   st  %i1, [ %o2 ]
0xff2b6080 <__register_frame_info_bases+132>:
    call  0xff2c7824 <_PROCEDURE_LINKAGE_TABLE_+444>
0xff2b6084 <__register_frame_info_bases+136>:   nop
0xff2b6088 <__register_frame_info_bases+140>:   ret
0xff2b608c <__register_frame_info_bases+144>:   restore
End of assembler dump.
(gdb) info registers
g0             0x0      0
g1             0xff2b6090       -13934448
g2             0x0      0
g3             0x0      0
g4             0x0      0
g5             0x0      0
g6             0x0      0
g7             0x0      0
o0             0x84     132
o1             0xffffffff       -1
o2             0xff215950       -14591664
o3             0x185    389
o4             0xff30b756       -13584554
o5             0xff376eb4       -13144396
sp             0xffbee8a0       4290701472
o7             0xff2b6008       -13934584
l0             0xff2c7980       -13862528
l1             0xff2c7978       -13862536
l2             0x0      0
l3             0x0      0
l4             0x0      0
l5             0x0      0
l6             0x0      0
l7             0xff2c75b4       -13863500
i0             0xff300000       -13631488
i1             0xff300000       -13631488
i2             0x0      0
i3             0x0      0
i4             0x0      0
i5             0x0      0
fp             0xffbee910       4290701584
i7             0xff2b60a0       -13934432
y              0x0      0
psr            0xfe400000       -29360128       icc:-Z--, pil:0, s:0, ps:0, et:0, cwp:0
wim            0x0      0
tbr            0x0      0
pc             0xff2b602c       4281032748
npc            0xff2b6030       -13934544
fpsr           0x0      0       rd:N, tem:0, ns:0, ver:0, ftt:0, qne:0, fcc:=, aexc:0, cexc:0
cpsr           0x0      0
#0  0xff2b602c in __register_frame_info_bases (begin=0xff300000,
    ob=0xff300000, tbase=0x0, dbase=0x0) from /tools/kde/gnu/lib/libgcc_s.so.1
#1  0xff2b60a8 in __register_frame_info (begin=0xff300000, ob=0xff300000)
   from /tools/kde/gnu/lib/libgcc_s.so.1
#2  0xff325b20 in frame_dummy () from /tools/gcc-3.2/lib/libstdc++.so.5
#3  0xff325a08 in _init () from /tools/gcc-3.2/lib/libstdc++.so.5
#4  0xff3bad04 in ?? ()
#5  0xff3ba990 in ?? ()
#6  0xff3c4900 in ?? ()
#7  0xff3b2940 in ?? ()


The line of code crashing appears to be

  ob->pc_begin = (void *)-1;

in unwind-dw2-fde.c

Disassembly of the caller:
Dump of assembler code for function __register_frame_info:
0xff2b6090 <__register_frame_info>:     save  %sp, -112, %sp
0xff2b6094 <__register_frame_info+4>:   mov  %i0, %o0
0xff2b6098 <__register_frame_info+8>:   mov  %i1, %o1
0xff2b609c <__register_frame_info+12>:  clr  %o2
0xff2b60a0 <__register_frame_info+16>:
    call  0xff2c7830 <_PROCEDURE_LINKAGE_TABLE_+456>
0xff2b60a4 <__register_frame_info+20>:  clr  %o3
0xff2b60a8 <__register_frame_info+24>:  ret
0xff2b60ac <__register_frame_info+28>:  restore
End of assembler dump.

As far as I can tell, the problem is caused by the following call:

0xff2b6008 <__register_frame_info_bases+12>:
    call  0xff2b5e38 <base_of_encoded_value+176>

This seems to overwrite %o1 with 0 since %i1, where it was saved in the caller, looks valid to me.

Any help would be greatly appreciated, as I would like to move from gcc 2.95.3 to 3.2 on Solaris.  So far, upgrading beyond 2.95.3 has been a nightmare.
>How-To-Repeat:
Compile C++ program, execute binary
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-09-22 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-22 10:56 aaronw [this message]
2002-10-01 20:59 davem
2002-10-01 21:16 Aaron Williams
2002-10-01 22:00 davem
2002-10-01 22:06 David S. Miller

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=20020922175041.5784.qmail@sources.redhat.com \
    --to=aaronw@net.com \
    --cc=gcc-gnats@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).