gnupic: I'm crashing the GUI in gpsim 0.20.X. Any ideas?
Subject:
Re: I'm crashing the GUI in gpsim 0.20.X. Any ideas?
From:
Ralf Forsberg ####@####.####
Date:
13 Oct 2001 11:43:06 -0000
Message-Id: <20011013134229.A12956@home.se>
On Wed, Oct 03, 2001 at 10:30:18PM -0400, Byron A Jeff wrote:
> However I've run into a problem. I'm using gpsim for testing. It had been
> working just fine with the GUI until I added/moved quite a bit of code.
> All of a sudden it starts segfaulting upon startup. Upon debugging I
> discovered that it was failing on a malloc deep in the C library.
>
> But it's flaky. It works fine a time or two then a string of segfaults.
I tried out Electric Fence, and found three bugs.
In eXdbm.c:
167c167
< DbmDbList = (TDbmDbList *) malloc(sizeof(DbmDbList));
---
> DbmDbList = (TDbmDbList *) malloc(sizeof(TDbmDbList));
For the bugs in gpsim, I made quick hacks. Scott, you should look
at this:
In src/cod.cc:
462c462
< for(offset=0; offset<COD_BLOCK_SIZE; offset += COD_LS_SIZE) {
---
> for(offset=0; offset<510; offset += COD_LS_SIZE) {
In src/pic-processor.cc:
1263c1263
< files[i].line_seek = new int[files[i].max_line];
---
> files[i].line_seek = new int[files[i].max_line+1];
/ Ralf