Segmentation Fault in xaccFreeSplit

Matthew Vanecek mevanecek at yahoo.com
Thu Jan 20 23:10:11 EST 2005


hey,
I don't know if this is just my machine, or what, but I've started getting
a segmentation fault in Gnucash, gnucash-gnome2-dev branch. I'm running
Fedora Core 3, updated via up2date somewhat regularly.  The crash occurs
when loading an existing file, or when exiting after creating a new file
and adding a split.  E.g., start gnucash, create empty file, add account
with opening balance (Opening Balance account auto-creates).  Quit, and
select yesyouwanttosave.  Application crashes.  It also is crashing on
opening an existing known good file.

Now, I don't know if this is a Fedora problem or a GC problem (or maybe
even a bad bit in memory), but I do know the bit of code.  The code that
is causing the problem is in Transaction.c in the xaccFreeSplit()
function:

        split->memo        = (char *) 1;

I think this has been that way a long long time, but I thought I'd poll
for opinions anyhow.  I put together a small test program (source
attached) that does the samae type of assignment, and sure enough it
crashes.  Anyhow, I'll eventually get around to rebooting, but in the
meantime, is this supposed to (continue to be) a valid assignment?  Much
appears to be changing with newer versions of glibc, etc., WRT standards
enforcement, etc.

Thanks,


-- 
Matthew Vanecek
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me.
I'm always getting in the way of something...





More information about the gnucash-devel mailing list