[
https://issues.apache.org/jira/browse/AXIS2C-1539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1539.
-------------------------------------
Fix Version/s: 2.0.0
(was: 1.7.0)
Resolution: Workaround
A workaround was implemented: users can call
axis2_options_set_xml_parser_reset(options, AXIS2_FALSE) to prevent
xmlCleanupParser() from being called when freeing the op_client. This addresses
the crash scenario described. The workaround is documented in the code (see
libxml2_reader_wrapper.c:474-478, referencing AXIS2C-884). A complete fix would
require moving init/cleanup to application level, but existing applications can
use the workaround.
> Initialization/finalization of libxml2 in wrong place
> -----------------------------------------------------
>
> Key: AXIS2C-1539
> URL: https://issues.apache.org/jira/browse/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
> Priority: Major
> Fix For: 2.0.0
>
>
> 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 thread.
> 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 was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]