[redland-dev] Redland MySQL double free()

Dave Beckett dave.beckett at bristol.ac.uk
Sun Dec 19 13:15:37 PST 2004


On Sun, 19 Dec 2004 21:52:07 +0100
Morten Frederiksen <mof-rdf at mfd-consult.dk> wrote:


...

> I just went through the relevant code in rdf_storage_mysql.c and I
> couldn't find anything wrong.
> 
> However, if the function 
> librdf_storage_mysql_find_statements_in_context_finished is called
> once too many, it might lead to the described result, since
> mysql_free_result doesn't nullify a released result set pointer.
> 
> So, you may want to check that out by putting a "sos->results=0;" line
> after the one with "mysql_free_result(sos->results);", it might just
> help (and certainly wont do any harm).
> 
> I don't think this is an error in the mysql engine, but rather a very
> real double free in the rasqal engine.

It seems so to me.  Some fixes between rasqal 0.9.2 and 0.9.4 
(given at http://librdf.org/rasqal/RELEASE.html )
include handling re-executing queries multiple times correctly which did
fix bugs in the resource allocating/freeing code; which might fix this.

Dave


More information about the redland-dev mailing list