I
reported the same problem some time ago, but found that I had a couple ot things
wrong with my code (using gdb/valgrind of course).
I had
a code sequence like:
xmlTextReaderPtr reader;
...
reader = xmlReaderForMemory
(buf, size, NULL, NULL, 0);
while (ret == 1) {
...
ret =
xmlTextReaderNext(reader); // skip subtree
...
...
ret =
xmlTextReaderRead(reader); ...
}
....
xmlFreeTextReader(reader);
// THIS USE TO CAUSE A SEG VIOLATION trying to free
reader->ctxt
After
doing some stack reorganization, in a few (c++) routines, I found the real cause
of my problem - over-writing some other variable. While I don't know your
code organization, I would recommend using some tools (gdb, valgrind, etc) to
help debug. There may still be a bug in this area, I am simply not seeing
the one I saw anymore; I'm using libxml2.6.5.
I've
found that these kinds of bugs/features can be very nasty and hard to sort
out. Good luck to you.
M.
Jones
|