[redland-dev] Redland MySQL double free()

Christopher Schmidt crschmidt at crschmidt.net
Sun Dec 19 15:16:00 PST 2004


On Sun, Dec 19, 2004 at 10:23:20PM +0000, Dave Beckett wrote:
> Off list I looked at Christopher's valgrind output and I think I found
> the problem in the mysql storage, calling the stream destructor
> explicitly.  The librdf_stream module then calls it itself once the
> stream is destroyed, freeing things twice.
> 
> Morten and I discussed this further on IRC (#redland on
> irc.freenode.net) and think this is the cause.  So deleting some of
> these extra destructions should fix it.
> 
> The patch is for 0.9.19 librdf/rdf_storage_mysql.c as released.

This worked; In the end, mortenf and I discovered some broken statements 
in the database that was causing this problem to start with. Thanks for 
all the help!

Also, for people who might run across this in the future, the 
"MALLOC_CHECK_" environment variable controls the "killing" of the 
process which violates this memory. Setting it to 0 got rid of some 
extra stuff on the top of the backtrace and helped me narrow the problem 
a bit further.

-- 
Christopher Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnomehack.com/pipermail/redland-dev/attachments/20041219/1a6884ed/attachment.pgp


More information about the redland-dev mailing list