[redland-dev] redland rasqal datatype problem (bug?)
Sebastian Trüg
strueg at mandriva.com
Tue Mar 25 09:45:05 GMT 2008
a double-free would be an obvious bug. I doubt that it is the problem. Anyway,
I tested it by simply disabling all free calls in my code. So nothing that I
allocate is freed anymore. The bug persists.
Cheers,
Sebastian
On Sunday 23 March 2008 11:59:28 Lauri Aalto wrote:
> On Fri, Mar 21, 2008 at 7:34 PM, Sebastian Trüg <strueg at mandriva.com> wrote:
> > Nevermind.
> > Apparently one needs to create one world instance for each storage. At
> > least that is what fixed the issue. I personally think this should be
> > stated in the documentation. ;)
>
> I think that's not the issue.
>
> I created some quick tests that parse in RDF/XML data with both typed
> and plain literals to two librdf_models on top of bdb hash
> librdf_storages created on top of the same librdf_world instance and
> run some queries. I could not reproduce the problem you saw. (However,
> this is a 32 bit system, not 64 bit like yours.)
>
> >From your gdb backtrace it looks like the datatype_uri is a valid
>
> pointer i.e. the datatype uri was valid at some point. Since the uri
> has turned invalid, apparently the memory has been overwritten later.
> Are you sure you don't have the same datatype uris in your code and
> accidentally e.g. double delete them --- redland uris are shared,
> reference counted objects and when the count becomes zero, the object
> is freed, possibly leaving dangling pointers behind. In this case,
> another librdf_world instance provides a workaround because uri
> objects are not shared across world instances.
>
> Please try to produce a test case that reproduces this issue without
> using any additional APIs on top of librdf.
>
> Lauri
> _______________________________________________
> redland-dev mailing list
> redland-dev at lists.librdf.org
> http://lists.librdf.org/mailman/listinfo/redland-dev
More information about the redland-dev
mailing list