gnupic: Segmentation fault ... did I bite off more then the current release can do?


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

Subject: Re: Segmentation fault ... did I bite off more then the current release can do?
From: Robert Warner ####@####.####
Date: 29 May 2002 02:51:18 -0000
Message-Id: <02052818423403.03555@amdk62300>

Ok,  after several compile/edit sequences I've come up with the following.  
It appears an array indexed with a variable causes a problem.

Here is the code:
...
#define RXBUFFLEN  80       // Rx buffer: more than enough for a 32-byte Ping
...
BYTE rxbuff[RXBUFFLEN];     // Receive buffer, I/O ptrs, and 'Rx full' flag
int rxin, rxout, rxcount;
...
void skip_space(void)
{
//    BYTE  rxout;			//RXWTest failed segmentation fault

    while (rxbuff[rxout] <= ' ')
//RXWTest passed no segmentation fault, any const value works
//    while (rxbuff[0] <= ' ')	
        getch_slip();
}
...


Note: 'rxout' bing global or local causes this problem.  I tried various 
simple scalar types with no change in the error.
Note:  This function works (similar, except it uses pointers instead)
/* Write a byte to the Tx buffer */
void write_txbuff(int *oset, BYTE *b)
{
    txbuff[*oset] = *b;
}


I'll attempt to restructure the current problem using pointers to see if this 
fixes the problem.

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: ####@####.####

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


Powered by ezmlm-browse 0.20.