Re: [xml] xmlNodeAddContent causes segmentation violation error



Thanks, Daniel.

   By the way, I thought I *did* use the XML_PARSE_INCLUDE option in the 
program I wrote, please see my previous message; it doesn't
seem to have prevented the problem in this case.  Have I 
misunderstood your suggestion?  

   CJG

On Fri, Jan 02, 2004 at 03:10:29PM -0500, Daniel Veillard wrote:
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]