Re[4]: [xml] Strange memory leak in libxml2-2.4.8 (may be in libxslt-1.0.6)



Hello, Daniel!
Friday, November 09, 2001, 1:33:30 AM, you wrote:

DV>   this obviously misses xmlCleanupParser(), and those blocks are
DV> allocated to initialize the library state, that's all...
 Ok. I see. Now I have such code (BTW, all my code is multithreaded, but
DV>   Don't look further ! I could have searched for years without such
DV> and indication.
DV>   Your thread handling is probably conflicting with libxml2 one.
DV> what used to be global variables may now be allocated in per threads
DV> blocks depending how the library was configured.
   Ok. I've found this bug. It is really strange.
   Some pointers, allocated in such code:

   xmlInitParser();
   doc = xmlParseFile(xmlname);
   xmlCleanupParser();

   are freed after that in such code:

   xmlInitParser();
   result = xsltApplyStylesheet(xslt,doc);
   xmlCleanupParser();

   inside xsltApplyStylesheet().
   
   And in this moment memory manager was CHANGED already, because
   documents and stylesheets/processing memory pools are DIFFERENT!

   Stylesheet application is not READ-ONLY operation for input
   _document_ (not stylesheet, I know about stylesheet and _private
   members)!

   SHIT! WHY?!
   I understand, it is question for xslt gnome org, but is here any
   plans to change such STRANGE situation?

               Lev Serebryakov
/-----------------------------------------------\
| FIDONet: 2:5030/661.0                         |
| E-Mail:  lev serebryakov spb ru               |
| Page:    http://lev.serebryakov.spb.ru/       |
| ICQ UIN: 3670018                              |
| Phone:   You know, if you have world nodelist |
\===============================================/




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