diff --git a/ChangeLog b/ChangeLog index dc4e2f26..0afc6834 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 21 10:20:34 CET 2009 Daniel Veillard + + * threads.c parser.c: more warnings about xmlCleanupThreads and + xmlCleanupParser to avoid troubles like #571409 + Fri Feb 20 09:40:04 CET 2009 Daniel Veillard * xmlwriter.c: cleanups and error reports when xmlTextWriterVSprintf diff --git a/parser.c b/parser.c index 9db664fd..a4d8e61d 100644 --- a/parser.c +++ b/parser.c @@ -13844,6 +13844,14 @@ xmlInitParser(void) { * the library and all XML/HTML documents built with it. * See also xmlInitParser() which has the opposite function of preparing * the library for operations. + * + * WARNING: if your application is multithreaded or has plugin support + * calling this may crash the application if another thread or + * a plugin is still using libxml2. It's sometimes very hard to + * guess if libxml2 is in use in the application, some libraries + * or plugins may use it without notice. In case of doubt abstain + * from calling this function or do it just before calling exit() + * to avoid leak reports from valgrind ! */ void diff --git a/threads.c b/threads.c index 2223e8a6..073fd142 100644 --- a/threads.c +++ b/threads.c @@ -892,6 +892,14 @@ xmlInitThreads(void) * * xmlCleanupThreads() is used to to cleanup all the thread related * data of the libxml2 library once processing has ended. + * + * WARNING: if your application is multithreaded or has plugin support + * calling this may crash the application if another thread or + * a plugin is still using libxml2. It's sometimes very hard to + * guess if libxml2 is in use in the application, some libraries + * or plugins may use it without notice. In case of doubt abstain + * from calling this function or do it just before calling exit() + * to avoid leak reports from valgrind ! */ void xmlCleanupThreads(void)