seg fault on master

John Ralls jralls at ceridwen.us
Mon Jul 6 01:27:21 EDT 2015


> On Jul 5, 2015, at 6:43 PM, Alex Aycinena <alex.aycinena at gmail.com> wrote:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff2025cf2 in std::_Rb_tree<char const*, std::pair<char const* const, KvpValueImpl*>, std::_Select1st<std::pair<char const* const, KvpValueImpl*> >, KvpFrameImpl::cstring_comparer, std::allocator<std::pair<char const* const, KvpValueImpl*> > >::_M_lower_bound (this=0x32069c0, __x=0x31, __y=0x3a286f8, 
>     __k=@0x7fffffffbda0: 0x33c16b8 "Budgeting")
>     at /usr/include/c++/4.9.2/bits/stl_tree.h:1277

This one is harder. I’ve found the cause, but it’s bedtime so I’ll have figure out what to fix tomorrow. The fundamental problem is that when I call “new KvpFrame” in sixtp-dom-parser.cpp, it’s allocating memory that libxml2 thinks belongs to it, so when the “data_for_children()” subtree is freed in gnc_book_slots_end_handler(), the frame belonging to that KvpValue gets freed and later overwritten by a call to g_log. When the optiondb tries to access later, boom.

Regards,
John Ralls





More information about the gnucash-devel mailing list