Re: [xml] LibXml2 Crash in MultiThreaded Windows



On Mon, Jun 09, 2008 at 07:56:42AM -0400, Rob Richards wrote:
Also it would be grt if u or Igor can spare some of ur valuable time &
go thru this blog......

http://blog.kowalczyk.info/archives/2006/08/07/the-missing-msvcr80dll-st
ory/

  But there isn't much we can do about this, this means the libc interfaces
are not standardized on Windows.
 

There is nothing strange about that. It also is a good reason why its 
stressed not to mix where you allocate/de-allocate memory (same with 
file descriptors) when working with dlls. If allocated in dll, make sure 
you de-allocate from within the dll. If you follow those guidelines, you 
can successfully use the library with a client compiled with a different 
run-time.

  Maybe one thing we can try do is minimize the reliance on FILE * . I would
hope fd integers values might be more portable across implementations
(or at least not lead to crashes). Of course we can't just deprecate FILE *
based APIs but making sure we don't use them too much internally and maybe
document the associated problems. I think most of the FILE based APIs are
about dump or debug output, and with the xmlSave module it should be as
convenient to use Fds .
  For internal use it's maybe the xmlIO.c which could be cleaned up 
a bit, but it's unclear this would really bring much benefits.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]