axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Halewijn Geerts (JIRA)" <>
Subject [jira] Created: (AXIS2C-1539) Initialization/finalization of libxml2 in wrong place
Date Mon, 14 Mar 2011 13:11:29 GMT
Initialization/finalization of libxml2 in wrong place

                 Key: AXIS2C-1539
             Project: Axis2-C
          Issue Type: Bug
          Components: core/clientapi, xml/parser
    Affects Versions: 1.6.0
         Environment: Windows XP SP2
            Reporter: Halewijn Geerts

Initialization of libxml2 is done in axis2_op_client_create and finalization in axis2_op_client_free.
So if you have generated stub code, this initializing will be done for each stub operation,
and finalizes when stub is freed. If another part of the application uses libxml2, then that
code can crash, because libxml2 is already freed by axis2/c

Documentation of libxml2 says that xmlInitParser should only be called once and preferably
from the main thread. xmlInitParser can not be called from 2 threads at the same time. Also
after calling xmlCleanupParser, no calls to libxml2 may be done anymore, also not from a different

To Reproduce crash on Windows: 
Initialize libxml2 in main thread, create client stub in background thread and call one of
its operations, afterwards free the stub. If you now do a call to libxml2 in the main thread,
your application will crash.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message