Bug 24822 - make[2]: *** [ada/einfo.h] Error 1
Summary: make[2]: *** [ada/einfo.h] Error 1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-12 16:51 UTC by John David Anglin
Modified: 2006-03-08 15:27 UTC (History)
1 user (show)

See Also:
Host: hppa*-*-hpux*
Target: hppa*-*-hpux*
Build: hppa*-*-hpux*
Known to work:
Known to fail:
Last reconfirmed: 2005-12-12 16:06:55


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-11-12 16:51:36 UTC
(cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo ../../sinfo.h )
mkdir -p ada/bldtools/einfo
cp -p ../../gcc/gcc/ada/einfo.ads ../../gcc/gcc/ada/einfo.adb ../../gcc/gcc/ada/
xeinfo.adb ada/bldtools/einfo
(cd ada/bldtools/einfo; gnatmake -q xeinfo ; ./xeinfo ../../einfo.h )

raised STORAGE_ERROR : stack overflow or erroneous memory access
make[2]: *** [ada/einfo.h] Error 1

# gdb-6.3 xeinfo
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "hppa2.0w-hp-hpux11.11"...
(gdb) r ../../einfo.h
Starting program: /mnt/gnu/gcc-3.3/objdir/gcc/ada/bldtools/einfo/xeinfo ../../einfo.h

Program received signal SIGSEGV, Segmentation fault.
0x00060db8 in system__finalization_implementation__get_deep_controller ()
(gdb) disass 0x00060d98 0x00060dd8
Dump of assembler code from 0x60d98 to 0x60dd8:
0x00060d98 <system__finalization_implementation__detach_from_final_list+528>:  copy r31,rp
0x00060d9c <system__finalization_implementation__detach_from_final_list+532>:  b,l 0x22920 <ada__exceptions__reraise_occurrence_always>,rp
0x00060da0 <system__finalization_implementation__detach_from_final_list+536>:  ldo -2f8(sp),r26
0x00060da4 <system__finalization_implementation__detach_from_final_list+540>:  nop
0x00060da8 <system__finalization_implementation__get_deep_controller+0>:       stw rp,-14(,sp)
0x00060dac <system__finalization_implementation__get_deep_controller+4>:       stw,ma r4,40(,sp)
0x00060db0 <system__finalization_implementation__get_deep_controller+8>:       copy r26,r4
0x00060db4 <system__finalization_implementation__get_deep_controller+12>:      stw r3,-3c(,sp)
0x00060db8 <system__finalization_implementation__get_deep_controller+16>:      ldw 0(,r26),r3
0x00060dbc <system__finalization_implementation__get_deep_controller+20>:      b,l 0x2eef0 <ada__tags__get_rc_offset>,rp
0x00060dc0 <system__finalization_implementation__get_deep_controller+24>:      copy r3,r26
---Type <return> to continue, or q <return> to quit---
0x00060dc4 <system__finalization_implementation__get_deep_controller+28>:      cmpib,=,n -2,ret0,0x60dec <system__finalization_implementation__get_deep_controller+68>
0x00060dc8 <system__finalization_implementation__get_deep_controller+32>:      cmpib,= 0,ret0,0x60dd8 <system__finalization_implementation__get_deep_controller+48>
0x00060dcc <system__finalization_implementation__get_deep_controller+36>:      ldi 0,r19
0x00060dd0 <system__finalization_implementation__get_deep_controller+40>:      cmpib,>= 0,ret0,0x60e28 <system__finalization_implementation__get_deep_controller+128>
0x00060dd4 <system__finalization_implementation__get_deep_controller+44>:      add,l r4,ret0,r19
End of assembler dump.
(gdb) p/x $r26
$1 = 0x0
(gdb) bt
#0  0x00060db8 in system__finalization_implementation__get_deep_controller ()
#1  0x00060f7c in system__finalization_implementation__deep_tag_attach ()
#2  0x00015594 in _ada_xeinfo ()
#3  0x0000f0dc in main ()

The segmentation fault is caused by system__finalization_implementation__deep_tag_attach ()
calling system__finalization_implementation__get_deep_controller ()
with a zero first argument.

I used gcc 4.0.2 as the bootstrap compiler.  I believe that the error
doesn't occur when gcc-3.4.4 is used.
Comment 1 Arnaud Charlet 2005-12-12 14:52:01 UTC
Is this issue still present ?

If the issue is with the bootstrap compiler, there's not much we can do.

Arno
Comment 2 dave 2005-12-12 15:55:01 UTC
Subject: Re:  make[2]: *** [ada/einfo.h] Error 1

> Is this issue still present ?

I last retested a build with Ada enabled about a week ago and the
problem was still present.

> If the issue is with the bootstrap compiler, there's not much we can do.

Bootstrap compiler is GCC.  This doesn't occur on linux, but it
doesn't need the -mdisable-indexing hack.  I'll try to investigate
further.

Dave
Comment 3 charlet@adacore.com 2005-12-12 16:06:25 UTC
Subject: Re:  make[2]: *** [ada/einfo.h] Error 1

> > If the issue is with the bootstrap compiler, there's not much we can do.
> 
> Bootstrap compiler is GCC.  This doesn't occur on linux, but it

Well sure, you can't bootstrap GNAT with anything else than GCC ;-)

Is this the same version of GCC ? Could you try with another version ?

> doesn't need the -mdisable-indexing hack.  I'll try to investigate
> further.

Thanks.

Arno
Comment 4 charlet@adacore.com 2005-12-12 16:08:45 UTC
Subject: Re:  make[2]: *** [ada/einfo.h] Error 1

>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|WAITING                     |NEW
>      Ever Confirmed|0                           |1
>    Last reconfirmed|0000-00-00 00:00:00         |2005-12-12 16:06:55
>                date|                            |

Well, I didn't want to confirm it (do not have the set up), I just
wanted to reopen the bug (as in, remove the "WAITING" state).

Anyway, no big deal.

Arno
Comment 5 dave 2005-12-12 22:50:52 UTC
Subject: Re:  make[2]: *** [ada/einfo.h] Error 1

> > > If the issue is with the bootstrap compiler, there's not much we can do.
> > 
> > Bootstrap compiler is GCC.  This doesn't occur on linux, but it
> 
> Well sure, you can't bootstrap GNAT with anything else than GCC ;-)
> 
> Is this the same version of GCC ? Could you try with another version ?

The error doesn't occur with 3.4.4.  I have a build of 4.1.0 underway.
If the build is successful, I will install and test it to see if the
miscompilation is still present with 4.1.  There was a recent fix that
should make debugging easier.

Is GNAT still being maintained in the 4.0 branch?

Dave
Comment 6 charlet@adacore.com 2005-12-13 07:22:30 UTC
Subject: Re:  make[2]: *** [ada/einfo.h] Error 1

> Is GNAT still being maintained in the 4.0 branch?

Yes, although only critical changes go there (as you would expect for
a release branch).

Arno
Comment 7 John David Anglin 2006-02-05 18:08:57 UTC
Still fails as of 2006-02-05 with 4.0.2 bootstrap.  Not present in 4.1.0
20060127 (prerelease).
Comment 8 Arnaud Charlet 2006-03-08 15:27:43 UTC
Given that 4.1.0 has been released and issue is fixed there, closing this
PR.

Arno