[redland-dev] [Redland librdf RDF API 0000475]: Freeing a counted_string returned by redland on a modern Windows system crashes

Mantis Bug Tracker mantis-bug-sender at librdf.org
Wed Oct 12 02:21:25 CEST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=475 
====================================================================== 
Reported By:                monkeyiq
Assigned To:                
====================================================================== 
Project:                    Redland librdf RDF API
Issue ID:                   475
Category:                   portability
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-10-12 00:21
Last Modified:              2011-10-12 00:21
====================================================================== 
Summary:                    Freeing a counted_string returned by redland on a
modern Windows system crashes
Description: 
When using a CRT environment in windows it appears you can not directly free() a
pointer to memory which was returned from a shared library. Attempts to do so
result in a crash. Instead you must call a function in that shared library which
itself will then free() the memory.

I am having trouble freeing the string returned from:
librdf_serializer_serialize_model_to_counted_string()

Would it be OK to add a general purpose redland_free() to the code so that
client applications such as abiword can use that function instead of calling
free() directly.


Steps to Reproduce: 
I have a sample application here:
http://www.abisource.com/mailinglists/abiword-dev/2011/Jul/0067.html

Note that this works OK on older windows, but 64 bit windows 7 causes an issue.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-10-12 00:21 monkeyiq       New Issue                                    
======================================================================



More information about the redland-dev mailing list