[redland-dev] Redland MySQL double free()
Morten Frederiksen
mof-rdf at mfd-consult.dk
Sun Dec 19 12:52:07 PST 2004
Hi,
On Sunday 19 December 2004 21:16, Christopher Schmidt wrote:
> #7 0x401ff6bf in free () from /lib/libc.so.6
> #8 0x406c91d2 in my_no_flags_free () from /usr/lib/libmysqlclient.so.12
> #9 0x406c35ba in mysql_free_result () from
> /usr/lib/libmysqlclient.so.12
> #10 0x4035b167 in
> librdf_storage_mysql_find_statements_in_context_finished
> (context=0x80bbd08) at rdf_storage_mysql.c:1736
> #11 0x4034f87c in librdf_free_stream (stream=0x80bc208) at
> rdf_stream.c:118
> #12 0x40352c37 in rasqal_redland_finish_triples_match (rtm=0x0,
> user_data=0x80bbff0) at rdf_query_rasqal.c:399
> #13 0x407482b6 in rasqal_free_triples_match (rtm=0x80a6870) at
> rasqal_engine.c:376
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.
Regards,
Morten
More information about the redland-dev
mailing list