gnupic: Re: Segmentation fault ... possible solution


Previous by date: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... did I bite off more then the current release can do?, Philip Restuccia
Next by date: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Scott Dattalo
Previous in thread: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Robert Warner
Next in thread: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Scott Dattalo

Subject: Re: Segmentation fault ... possible solution
From: Philip Restuccia ####@####.####
Date: 29 May 2002 13:11:16 -0000
Message-Id: <3CF4CF71.F9F9007C@nortelnetworks.com>

Robert Warner wrote:
> 
> Ok, this works ...
> 
> //void skip_space(void)
> void skip_space( int *prxout)
> {
> //    int       *prxout = &rxout;               //RXWTest

Again, like I stated in my reply to your previous post, this will work
(assuming rxout is global) only because rxout will have been initialized
to 0, as are all global variables that are not otherwise explicitly initialized.

You must NOT assume that local (auto) variables within a function are any particular
value when you enter that function; it depends on what happens to be on the stack at
that point. You should ALWAYS explicitly initialize local variables (if appropriate)
before using them.

	Phil

> 
>     while (rxbuff[*prxout] <= ' ')
> //    while (rxbuff[10] <= ' ') //RXWTest
>         getch_slip();
> }
> 
> Thanks
> Bob
> 
> On Tuesday 28 May 2002 07:57, Scott Dattalo wrote:
> > On Mon, 27 May 2002, Robert Warner wrote:
> > > I'm attempting to build the picweb.c module (with appropriate mods to
> > > code for GNU) from the PICDEM dev board/sw.  After fixing numerous
> > > 'portation' issues/errors (reported by sdcc)  I get a segmentation fault
> > > when I attempt to compile.  Should I not attempt something so large with
> > > this current release of sdcc?  Do you need any more information of the
> > > error?  If so, please specify the information and I'll attempt to get it.
> >
> > In general, if you can boil the source down to the point it exhibits
> > the bug and send a copy to me that'd be great. I also monitor the bug
> > reports sent to SDCC's web page so you can send it there too if you want.
> >
> > If you want to send me a copy of what you got now, I'll run it under my
> > development version of SDCC. Since it's been over a week that I've checked
> > anything in, there are numerous differences between my copy and CVS. (Most
> > notable is automatic function in-lining is almost working.)
> >
> > Scott
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ####@####.####
> > For additional commands, e-mail: ####@####.####
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

-- 
Philip Restuccia
Senior Principal Software Engineer
Nortel Networks
####@####.####

Previous by date: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... did I bite off more then the current release can do?, Philip Restuccia
Next by date: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Scott Dattalo
Previous in thread: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Robert Warner
Next in thread: 29 May 2002 13:11:16 -0000 Re: Segmentation fault ... possible solution, Scott Dattalo


Powered by ezmlm-browse 0.20.