Possible bug in globals.c

View: New views
2 Messages — Rating Filter:   Alert me  

Possible bug in globals.c

by kai_henning :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

IMO you should change in xmlInitGlobals()

    if (xmlThrDefMutex != NULL)

to

   if (xmlThrDefMutex == NULL)


because you must allocate memory when xmlThrDefMutex is NULL (from static initialization).

----
Kai
______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@...
http://mail.gnome.org/mailman/listinfo/xml

Re: Possible bug in globals.c

by Daniel Veillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 08, 2009 at 01:03:01PM +0200, Kai Henning wrote:

> IMO you should change in xmlInitGlobals()
>
>     if (xmlThrDefMutex != NULL)
>
> to
>
>    if (xmlThrDefMutex == NULL)
>
>
> because you must allocate memory when xmlThrDefMutex is NULL (from static initialization).

  Damn, it's unbelieveable how much breackage happened around the thread
code recently, thanks for raising this !

  Applied,

Daniel

--
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@...  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@...
http://mail.gnome.org/mailman/listinfo/xml