Re: [xml] xmlNodeAddContent causes segmentation violation error



On Thu, Jan 01, 2004 at 11:27:01PM -0800, Christopher J. Grayce wrote:

Dear All,

   Many thanks to the responses I got about my last trouble with
XInclude, I appreciate the efforts of the several people who got back
to me so quickly.

   I'm wondering if I can ask for some more help.  I'm up against
another mysterious SIGSEGV in a pretty simple situation:

  Okay problem analyzed and in part fixed in CVS. Here is the "problem":
    - the new APIs build document with dictionnaries
    - the "blank" nodes or some small text nodes have text strings which
      are not allocated from xmlMalloc/xmlFree but from the dictionaries
    - there was a bug in the parser allocating the given non-blank string
      from the dictionnary, that is fixed.
In general some the APIs modifying text nodes are not yet aware of this
allocation difference. I suggest you use the
   XML_PARSE_XINCLUDE
option in xmlReadXXX() when building documents that you intent to modify,
at least until the tree APIs are fully fixed to check for strings from
the dictionnary.

  thanks for the report, the main problem is fixed in CVS,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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