From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 3A56E2F099 for ; Thu, 30 Nov 2000 18:11:12 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eAUNBC321861 for axp-list@listman.redhat.com; Thu, 30 Nov 2000 18:11:12 -0500 Received: from usilms50.cai.com (mail1.cai.com [141.202.248.38]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eAUNBBD21857 for ; Thu, 30 Nov 2000 18:11:11 -0500 Received: by usilms50.cai.com with Internet Mail Service (5.5.2650.21) id ; Thu, 30 Nov 2000 18:12:52 -0500 Message-ID: <61FC074AB601D411B7970050046089BA047F520E@usilms10.ca.com> From: "Hankinson, Jeremy" To: axp-list@redhat.com Subject: RE: who is responsible for egcs/gcc on alpha nowadays Date: Thu, 30 Nov 2000 18:12:42 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C05B23.0A8C8C60" X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C05B23.0A8C8C60 Content-Type: text/plain; charset="iso-8859-1" I think I'm hitting this problem with egcs-2.91.66. I'm porting Ingres to run on Alpha Linux and twice now, at different parts in the code I've had a SEGV similar to the one below which as been resolved by compiling with -O0. Not ideal for a database. Has there been any further development with this issue? Is there a fix? Any help would be greatly appreciated. Jeremy Hankinson Ingres Dev - Linux Computer Associates Islandia, NY e-mail: jeremy.hankinson@ca.com tel: +1 631 342 5086 -----Original Message----- From: Uncle George [mailto:gatgul@voicenet.com] Sent: Wednesday, October 04, 2000 5:45 PM To: axp-list@redhat.com; Michal Jaegermann Subject: Re: who is responsible for egcs/gcc on alpha nowadays Ok, now got a simple sample. it seems that using -O2 causes the frame pointer to be off. compile with gcc -O2 -g tstparm.c tstparm2.c using "gdb a.out" u can either step trace ( display/i $pc & then si ), or just "r" and show the back trace a -02 build has this back trace. the variable lineAddr should have 0x1000000007 in it =========================================================== $ gdb a.out GNU gdb 19991004 Copyright 1998 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 "alpha-redhat-linux"... (gdb) r Starting program: /gat/alinux-java/build/solaris/a.out Program received signal SIGSEGV, Segmentation fault. foo_4ch_bl (leftEdges=0x1000000001, rightEdges=0x1000000002, xStarts=0x1000000003, yStarts=0x1000000004, sides=0x1000000005, dstData=0x200003a5408 " h\025", lineAddr=0x200003aaa48, dstYStride=1, srcYStride=1299556) at /tmp/tstparm2.c:35 35 foo_s32 yFinish = sides[1]; (gdb) where #0 foo_4ch_bl (leftEdges=0x1000000001, rightEdges=0x1000000002, xStarts=0x1000000003, yStarts=0x1000000004, sides=0x1000000005, dstData=0x200003a5408 " h\025", lineAddr=0x200003aaa48, dstYStride=1, srcYStride=1299556) at /tmp/tstparm2.c:35 #1 0x12000044c in main () at /tmp/tstparm.c:37 ===================================================================== and gcc -O1 -g produces this ====================================================================== gdb a.out GNU gdb 19991004 Copyright 1998 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 "alpha-redhat-linux"... (gdb) r Starting program: /gat/alinux-java/build/solaris/a.out Program received signal SIGSEGV, Segmentation fault. foo_4ch_bl (leftEdges=0x1000000001, rightEdges=0x1000000002, xStarts=0x1000000003, yStarts=0x1000000004, sides=0x1000000005, dstData=0x1000000006
, lineAddr=0x1000000007, dstYStride=268435464, srcYStride=268435465) at /tmp/tstparm2.c:35 35 foo_s32 yFinish = sides[1]; Michal Jaegermann wrote: > Uncle George wrote: > > > > It seems like the egcs compiler in redhat/6.2 is producing bad stack > > addressing. In my case it appears to be off by 16 bytes, and fetches the > > 7th arg from the wrong place( short by 16 bytes in fact ). > > I, for one, would be really interested in seeing a sample code which > would demonstrate that. I have seen in the past wrong offsets but they > were results of bugs in sources. ------_=_NextPart_001_01C05B23.0A8C8C60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: who is responsible for egcs/gcc on alpha nowadays

I think I'm hitting this problem with = egcs-2.91.66.
I'm porting Ingres to run on Alpha Linux and twice = now, at different parts in the code I've had a SEGV similar to the one = below which as been resolved by compiling with -O0. Not ideal for a = database.

Has there been any further development with this = issue?
Is there a fix?
Any help would be greatly appreciated.


Jeremy Hankinson
Ingres Dev - Linux
Computer Associates
Islandia, NY
e-mail: jeremy.hankinson@ca.com
tel: +1 631 342 5086


-----Original Message-----
From: Uncle George [mailto:gatgul@voicenet.com]
Sent: Wednesday, October 04, 2000 5:45 PM
To: axp-list@redhat.com; Michal Jaegermann
Subject: Re: who is responsible for egcs/gcc on = alpha nowadays


Ok, now got a simple sample. it seems that using -O2 = causes the frame pointer
to be off.
compile with
gcc -O2 -g   tstparm.c tstparm2.c

using "gdb a.out"  u can either step = trace  ( display/i $pc  & then si ), or
just "r" and  show the back = trace
a -02 build has this back trace. the variable = lineAddr should have
0x1000000007 in it

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
$ gdb a.out
GNU gdb 19991004
Copyright 1998 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 = "alpha-redhat-linux"...
(gdb) r
Starting program: = /gat/alinux-java/build/solaris/a.out

Program received signal SIGSEGV, Segmentation = fault.
foo_4ch_bl (leftEdges=3D0x1000000001, = rightEdges=3D0x1000000002,
    xStarts=3D0x1000000003, = yStarts=3D0x1000000004, sides=3D0x1000000005,
    dstData=3D0x200003a5408 " = h\025", lineAddr=3D0x200003aaa48, dstYStride=3D1,
    srcYStride=3D1299556) at = /tmp/tstparm2.c:35
35  foo_s32  yFinish =3D sides[1];
(gdb) where
#0  foo_4ch_bl (leftEdges=3D0x1000000001, = rightEdges=3D0x1000000002,
    xStarts=3D0x1000000003, = yStarts=3D0x1000000004, sides=3D0x1000000005,
    dstData=3D0x200003a5408 " = h\025", lineAddr=3D0x200003aaa48, dstYStride=3D1,
    srcYStride=3D1299556) at = /tmp/tstparm2.c:35
#1  0x12000044c in main () at = /tmp/tstparm.c:37

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
and gcc  -O1 -g produces this
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D

gdb a.out
GNU gdb 19991004
Copyright 1998 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 = "alpha-redhat-linux"...
(gdb) r
Starting program: = /gat/alinux-java/build/solaris/a.out

Program received signal SIGSEGV, Segmentation = fault.
foo_4ch_bl (leftEdges=3D0x1000000001, = rightEdges=3D0x1000000002,
    xStarts=3D0x1000000003, = yStarts=3D0x1000000004, sides=3D0x1000000005,
    dstData=3D0x1000000006 = <Address 0x1000000006 out of bounds>,
    lineAddr=3D0x1000000007, = dstYStride=3D268435464, srcYStride=3D268435465)
    at /tmp/tstparm2.c:35
35  foo_s32  yFinish =3D sides[1];


Michal Jaegermann wrote:

> Uncle George wrote:
> >
> > It seems like the egcs compiler in = redhat/6.2 is producing bad stack
> > addressing. In my case it appears to be = off by 16 bytes, and fetches the
> > 7th arg from the wrong place( short by 16 = bytes in fact ).
>
> I, for one, would be really interested in = seeing a sample code which
> would demonstrate that.  I have seen in = the past wrong offsets but they
> were results of bugs in sources.

------_=_NextPart_001_01C05B23.0A8C8C60--