More information on the memory corruption in test-query

Derek Atkins warlord at MIT.EDU
Mon May 24 23:54:40 EDT 2004


More information...  I was running (g2 branch) on my FC2 test
system.  It apparantly has a fixed version of libltdl so running
with EFence works.  It died in a difference place.  I'm fairly
sure this is due to EFence signalling access to free()'d data,
but it's hard to tell which commodity is freed, or why.

Linas, do you have a clue what's going on?  You've played in the
engine more recently than anyone else....

-derek

Program received signal SIGSEGV, Segmentation fault.
gnc_commodity_equiv (a=0xf3fa6fa8, b=0xf5182fa8) at gnc-commodity.c:901
901       if(a->namespace != b->namespace) return FALSE;
(gdb) where
#0  gnc_commodity_equiv (a=0xf3fa6fa8, b=0xf5182fa8) at gnc-commodity.c:901
#1  0x001306d2 in xaccSplitScrub (split=0xf25d6f64) at Scrub.c:244
#2  0x0013063e in xaccTransScrubSplits (trans=0x1) at Scrub.c:197
#3  0x00130a1a in xaccTransScrubImbalance (trans=0xf29c4f98, root=0x0,
    parent=0x0) at Scrub.c:333
#4  0x00136590 in xaccTransCommitEdit (trans=0xf29c4f98) at Transaction.c:1575
#5  0x00125336 in xaccAccountCommitEdit (acc=0xf3900f2c) at Account.c:365
#6  0x0012546c in xaccAccountDestroy (acc=0x1) at Account.c:399
#7  0x0012af59 in xaccFreeAccountGroup (grp=0xf3b2bfec) at Group.c:301
#8  0x0012511e in xaccAccountCommitEdit (acc=0xf3c5cf2c) at Account.c:352
#9  0x0012546c in xaccAccountDestroy (acc=0x1) at Account.c:399
#10 0x0012af59 in xaccFreeAccountGroup (grp=0xf464efec) at Group.c:301
#11 0x0012aef1 in xaccAccountGroupDestroy (grp=0xf464efec) at Group.c:255
#12 0x0012ab3f in xaccCollSetAccountGroup (col=0xf4650ff0, grp=0x0)
    at Group.c:106
#13 0x0012ac09 in xaccSetAccountGroup (book=0xf5182fa8, grp=0x0) at Group.c:131
#14 0x0012bf1d in group_book_end (book=0xf550efc8) at Group.c:1250
#15 0x00159bb6 in qof_object_book_end (book=0xf550efc8) at qofobject.c:70
#16 0x0015885c in qof_book_destroy (book=0xf550efc8) at qofbook.c:109
#17 0x001615d1 in qof_session_destroy (session=0xf550cfe4) at qofsession.c:807
#18 0x0804b2ae in run_test () at test-query.c:63
---Type <return> to continue, or q <return> to quit---
#19 0x0804b2e0 in main_helper (closure=0x0, argc=1, argv=0xfef7ae34)
    at test-query.c:75
#20 0x009f560f in scm_init_guile () from /usr/lib/libguile.so.12
#21 0x009f55cc in scm_init_guile () from /usr/lib/libguile.so.12
#22 0x009f52a0 in scm_boot_guile () from /usr/lib/libguile.so.12
#23 0x0804b323 in main (argc=1, argv=0xfef7ae34) at test-query.c:86
(gdb) p a
$1 = (const gnc_commodity *) 0xf3fa6fa8
(gdb) p b
$2 = (const gnc_commodity *) 0xf5182fa8
(gdb) p *a
$3 = {inst = {entity = {e_type = 0x0, guid = {
        data = "\uffff\u06b6\205\uffff\uffff9\uffffR\n\uffff\214\uffff\uffff\uffffk", __align_me = -2051614006},
      collection = 0x0}, book = 0xf550efc8, kvp_data = 0xf3fa8ffc,
    editlevel = 0, do_free = 0, dirty = 0}, namespace = 0x0, fullname = 0x0,
  mnemonic = 0x0, printname = 0x0, exchange_code = 0x0, fraction = 60142,
  unique_name = 0x0, mark = 0, quote_flag = 0, quote_source = 0x0,
  quote_tz = 0x0}
(gdb) p *b
$4 = {inst = {entity = {e_type = 0x0, guid = {
        data = ")!\016\230\uffffa\177;\006\036\234\uffff!|\a0",
        __align_me = -1743904471}, collection = 0x0}, book = 0xf550efc8,
    kvp_data = 0xf5188ffc, editlevel = 0, do_free = 0, dirty = 0},
  namespace = 0x0, fullname = 0x0, mnemonic = 0x0, printname = 0x0,
  exchange_code = 0x0, fraction = 100, unique_name = 0x0, mark = 0,
  quote_flag = 0, quote_source = 0x0, quote_tz = 0x0}
(gdb)

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list