Re: [xml] another of those fun SEGV's in xmlFreeDoc?



What sematic differences are there? Does xlmReadMemory do validation and attribute loading from the DTD (more that I left-out originally, sorry - i'm not the only one "contributing" to this code and they went down a path of getting default values from a DTD)


  no. It's the new parser API, the one using SAX2 parser and not the old one.

I guess that shows how long ago this project started and how quickly it progressed :) Can one mix and match, or do I need to switch all calls to the new parser versions?

 I can't guess what this does to doc or cur.
 Do you still get the problem if you skip that step ?

Yeah, I was wondering about that as I was doing the cut-and-paste. I'll go digging through to see what that routine might be doing...

still digging through code not of my own doing :) it looks like part of what was in the doc may be passed-off to another thread, which looks like it would be fraught with posiblities.

yeah, this should not hang

Did you tried to run your app under valgrind. I can't see anything wrong which would lead to the problem

I have no idea what valgrind is, so nope :)


then it's really time you stop anything else and learn about it. Seriously
it spots memory use error, is present in all Linux distros and works by
reinterpreting instructions (so slow but extremely accurate and thorough)

   http://valgrind.org/

it will spot for example the unfreed attribute value.

Alas http://valgrind.org/info/platforms.html

Current Mainline

The Valgrind 3.0.X series supports the following platforms.

    * x86/Linux: support is mature and almost complete.
    * AMD64/Linux: support is new but fairly complete.
    * PPC32/Linux: support is new, incomplete, but improving.

...

Experimental

Same platform list...

And my work happens to be on IA64 (Itanium)...

rick



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