Re: [xml] logging a bug



On Wed, Nov 20, 2013 at 09:52:27AM +0000, Tassyns, Bram wrote:
   Hi, the bug tracking system of libxml2 only mentions up to version
   2.7.8 but I found one in 2.9.1.

   Where should I log it and how?

   The bug is that when xmlReadIO is the first call you do on the library
   it crashes because xmlInitParser hasn't been called yet.

   If I interpret the documentation correctly xmlInitParser isn't required
   when you don't process in multiple threads.

   Adding xmlInitParser(); at the beginning of xmlReadIO in parser.c seems
   to fix the issue (I found other methods using a similar construction).

  The problem is that we can't really add an xmlInitParser() to every
single call exported by libxml2 (1500+) and since more and more programs
or library code is intended to be multithreaded, it is really a good
habit to initializat the library (in the main thread or at library init
time).
  We added such call to the most used entry points related to parsing
but indeed xmlRead* and xmlCtxtRead* could get those too, as well as
their html counterparts (htmlReadIO calls it nut not others !)

  So it's a bit messy, but adding it to all xmlRead* xmlCtxtRead*
and html equivalents sounds a fair request, even if 'bug' might be
a bit too strong :-)

  Commited locally, I will push later when I get access,

   Pushed now ...

  thanks,

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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