Re: [xml] runtest mystery bug: name2.xml error case regression test



On Wed, 12 Sep 2012, Daniel Veillard wrote:

 I could try to put Ubuntu on a VM too and see what is going on.
Did you manage to isolate what specific test is failing, doing the
same through xmllint command line test might be easier to debug,

I did some more digging on this, this time using GCC's -finstrument-functions in conjunction with Michal Ludvig's handy-dandy CygProfiler suite (http://www.logix.cz/michal/devel/CygProfiler/), and have obtained some interesting results. But first, a question...

The value of INPUT_CHUNK in include/libxml/parserInternals.h: Is it valid/legal to crank this value up? Like, say, from 250 to 250000?

That change causes the (unmodified) runtest program to do this on FC17:

        $ ./runtest
        ## XML regression tests
        ## XML regression tests on memory
        ## XML entity subst regression tests
        ## XML Namespaces regression tests
        ## Error cases regression tests
        Error for ./test/errors/attr1.xml failed
        File ./test/errors/attr1.xml generated an error
        Error for ./test/errors/attr2.xml failed
        File ./test/errors/attr2.xml generated an error
        Error for ./test/errors/name2.xml failed
        File ./test/errors/name2.xml generated an error
        ## Error cases stream regression tests
        ## Reader regression tests
        ## Reader entities substitution regression tests
        ## Reader on memory regression tests
        ## Walker regression tests
        ## SAX1 callbacks regression tests
        Got a difference for ./test/rdf2
        File ./test/rdf2 generated an error
        ## SAX2 callbacks regression tests
        Got a difference for ./test/rdf2
        File ./test/rdf2 generated an error
        ## XML push regression tests
        ## HTML regression tests
        ## Push HTML regression tests
        ## HTML SAX regression tests
        ## Valid documents regression tests
        ## Validity checking regression tests
        ## General documents valid regression tests
        ## XInclude regression tests
        ## XInclude xmlReader regression tests
        ## XInclude regression tests stripping include nodes
        ## XInclude xmlReader regression tests stripping include nodes
        ## XPath expressions regression tests
        ## XPath document queries regression tests
        ## XPointer document queries regression tests
        ## xml:id regression tests
        ## URI parsing tests
        ## URI base composition tests
        ## Path URI conversion tests
        ## Schemas regression tests
        ## Relax-NG regression tests
        ## Relax-NG streaming regression tests
        ## Pattern regression tests
        ## C14N with comments regression tests
        ## C14N without comments regression tests
        ## C14N exclusive without comments regression tests
        ## C14N 1.1 without comments regression tests
        ## Catalog and Threads regression tests
        Total 2829 tests, 5 errors, 0 leaks

(All the other "make check" tests pass.)

I was finally able to do a proper execution-trace diff with the CygProfiler output, which showed that the good versus bad runs diverged in xmlParseStartTag2(). Further GDB and printf() action seemed to point to line 9213:

        if (ctxt->input->base != base) goto base_changed;

So the issue, as far as I can tell, appears to be realloc() shenanigans (or something a lot like it).


--Daniel


--
Daniel Richard G. || danielg teragram com || Software Developer
Teragram Linguistic Technologies (a division of SAS)
http://www.teragram.com/




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