From: JMK <jeffrey.m.klopotic@lmco.nospam.com>
Subject: Re: segfault and gcc-2.96
Date: Mon, 04 Nov 2002 15:32:32 -0800 [thread overview]
Message-ID: <3DC70390.3C7CDB89@lmco.nospam.com> (raw)
In-Reply-To: EzMw9.1438$hf.102567@castor.casema.net
Mark Swaanenburg wrote:
>
> "JMK" <jeffrey.m.klopotic@lmco.nospam.com> schreef in bericht
> news:3DC324DA.4C495AEC@lmco.nospam.com...
> > I was given a task to port a program written with Cygnus on an X86 box
> > to a Suse Alpha. I am getting SEGMENTATION FAULTS also on code that
> > works fine on the other computer.
> >
> > The existing code points to heavy use of stack vs heap memory and I've
> > found a URL where someone details the porting issue that arises with
> > such design.
> >
> > I'm trying to increase the heap size somehow, but can't find
> > documentation on how to do it. I've got gcc version 2.95.2 20000220
> > (Debian GNU/Linux) compiler. I've read other material that says
> > setting stack size can't be done. I'm hoping its not this compiler.
> >
> > Can it be done? If so, it could be the same problem you are facing and
> > answer would benefit us both.
> >
> > Otherwise I need to go through my core dump. Tips on analyzing a core
> > dump appreciated.
>
> I am also not very familiar with analyzing core dumps, but what I always do
> is to start with a backtrace (bt). That shows you in which function the
> segfault occured. It also displays the values of the arguments which were
> passed to the functions. I hope this will give you something to start with.
>
> Mark
>
> >
> > Jeff
Mark,
Thanks for getting back with me.
When it crashed, (I have DDD to work with - a fairly good tool!) I did
some returns and a back trace and it appears that it doesn't like
// Global
char *f1 = "default.str";
.
.
.
{
{
char pfix[12]
cin.getline(pfix,12,'\n');
...
strcpy (f1, pfix); <-------- Program received signal SIGSEGV,
Segmentation fault.
__stxcpy () at ../sysdeps/alpha/stxcpy.S:246
246 ../sysdeps/alpha/stxcpy.S: No such file or directory
Current language\: auto; currently asm
...
}
}
uname -a
Linux xxx01 2.2.17 #1 Thu Jun 29 13:33:28 EDT 2000 alpha unknown
gcc version 2.95.2 20000220 (Debian GNU/Linux) compiler
The code was developed on a Cygnus equipped PC and is being ported to a
Linux Alpha.
I compiled with -Wall and the only error is a function that has a loop
in it with no return -- warning control reaches end of non-void function
'func'. The portion it complains about never gets reached.
Is there a way to tell if I'm choking the stack with memory demands on
the Alpha v. the PC?
Is there a known bug in __stxcpy? I checked the web, but if so,
documentation isn't wasn't forthcoming.
Any help appreciated,
Jeff
next parent reply other threads:[~2002-11-04 23:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <apqobk$ocj$1@news.tudelft.nl>
[not found] ` <3DC324DA.4C495AEC@lmco.nospam.com>
[not found] ` <EzMw9.1438$hf.102567@castor.casema.net>
2002-11-04 23:32 ` JMK [this message]
2002-11-05 0:35 ` segfault and gcc-2.96 Ulrich Weigand
2002-11-05 0:35 ` Falk Hueffner
2002-11-05 7:31 ` Mark Swaanenburg
2002-11-06 4:40 ` Kevin Easton
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox