gnupic: Re: Segmentation fault ... other locations of problem and different types of fixes
Subject:
Re: Segmentation fault ... other locations of problem and different
types of fixes
From:
Scott Dattalo ####@####.####
Date:
30 May 2002 06:04:36 -0000
Message-Id: <Pine.LNX.4.44.0205292243080.30293-100000@ruckus.brouhaha.com>
On Wed, 29 May 2002, Robert Warner wrote:
> This may or may not help. There were 2 additional locations. However each
> required a different type of fix to solve it. Here they are
Yes, I have verified this. It's easy to stop the core dump by commenting
out the offending code. However, the generated assembly is still wrong. In
short, using variables to index into arrays is broken. Although I did fix
the simple case:
char buff[10];
char dummy, achar0;
....
;#CSRC pointer1.c 90
; dummy = buff[achar0];
MOVF _achar0,W ;key=000,flow seq=002
ADDWF _buff,W ;key=001,flow seq=002
MOVWF r0x2E ;key=002,flow seq=002
MOVF r0x2E,W ;key=003,flow seq=002
MOVWF FSR ;key=004,flow seq=002
MOVF INDF,W ;key=005,flow seq=002
MOVWF _dummy ;key=006,flow seq=002
The r0x2E business is overhead that I'll trim soon enough....
My next priority will be pointers.
Scott