From owner-gcc@vger.rutgers.edu Tue Nov 22 15:35:45 1994
Return-Path: <owner-gcc@vger.rutgers.edu>
Received: from texas.nynexst.com by titanic.nynexst.com (4.1/SMI-4.1.nynexst)
	id AA16389; Tue, 22 Nov 94 15:35:42 EST
Received: from vger.rutgers.edu by texas.nynexst.com (4.1/SMI-4.1.nynexst)
	id AA21661; Tue, 22 Nov 94 15:34:21 EST
Received: by vger.rutgers.edu (5.59-1.0-RU-ROUTER/3.08) 
	id AA28280; Tue, 22 Nov 94 15:31:06 EST
Message-Id: <199411222033.MAA04353@miles.phys.washington.edu>
To: koenig@tat.physik.uni-tuebingen.de (Harald Koenig)
Cc: linux-gcc@vger.rutgers.edu
Subject: Re: ELF problem with Motif-1.2.4 
In-Reply-To: Your message of "Tue, 22 Nov 1994 18:12:12 +0100."
             <9411221718.AA22410@nova.tat.physik.uni-tuebingen.de> 
Date: Tue, 22 Nov 1994 12:33:23 -0800
From: "Reginald S. Perry" <reggie@phys.washington.edu>
Sender: owner-gcc@vger.rutgers.edu
Precedence: bulk
Status: OR

>"Harald" == Harald Koenig <koenig@tat.physik.uni-tuebingen.de> writes:

> Hi, there is a strange problem with Motif-1.2.4 and ELF shared libs.
> With the (yet?) most recent tools

> 	gcc-elf 2.6.3-941119 libc-4.6.22 binutils-2.5.2.1 ld.so-1.5.2

> buildung shared Motif libs and running the periodic demo works with
> one exception: if periodic is linked with shared elf libXm and I try
> to input any character in a text widget with the keyboard the
> program loops and it's size grows until killed.

	I had that problem also with gcc-elf 2.6.2 libc-4.6.20
binutils-2.5.2.1 ld.so-1.5.2. I also had an interesting problem with
plan. When you attempt to configure the holidays, a text buffer is
displayed with the holidays contained within. While editing if you hit
a space the app dies and all of the plan windows go away. Maybe this
is related to your problem but when I attempted to trace it, the
segfault traced back to XtAppMainLoop and some procedure called
serv_stayalive or something like that.

> This problem won't occur if I do only one or more of the following
> things:

> - link the module TextIn.o of libXm explicitly (but TextIn.o is
> still included in the shared lib) - compile TextIn.c in libXm with
> -O0 (-O1 and -O2 will break; in libXm) - compile TextIn.c in libXm
> with -O2 -g (in libXm)

	The problem with plan went away with -g -static.

> debugging is difficult since TextIn.c is 220k size; TextIn.o is 62k
> size without debug information and the problem won't occur outside
> ELF shared libs and OSF/Motif is licenced code so I can't mail
> sources :-(

	Well our school has a site license so I have the sources. Ill
be glad to attempt to contribute what little I can. :-)

> What other ideas do you have to locate the Motif problem?

	Is it possible that the optimizations are emmiting bad code?
Maybe we can do a comparision?

> PPS: I'm using X11R5pl26/XFree86-2.1.1 ELF shared libs for this at
> the moment (when all problems with X11R5 are fixed; I'll try running
> ELF shared libs of Motif-1.2.4 with X11R6pl5/XFree86-3.1...)

	Dont bother. I get the same problem with
X11R6pl5/XFree86-3.1. :-(


-Reggie

-------------------
Reginald S. Perry -- University of Washington, Department of Physics FM-15
                     Seattle, Washington 98195
reggie@phys.washington.edu


