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

On 10/31/12 04:59 PM, Petr Sumbera wrote:
On 10/30/12 03:53 PM, Petr Sumbera wrote:
I'm not sure I can follow this thread. I'm seeing the same problem with
version 2.9.0 with 64bit libxml2 on Solaris (32 bit version works well):

## Error cases regression tests
Error for ./test/errors/name2.xml failed
File ./test/errors/name2.xml generated an error
## Error cases stream regression tests

Not sure what that can mean or how can I debug it down.

Well. It seems it's really problem of libxml2 not reporting same error messages when realloc() returns different pointer than it was given against the situation where it returns the same pointer.

file: parser.c; xmlParseStartTag2()

        attname = xmlParseAttribute2(ctxt, prefix, localname,
                                     &aprefix, &attvalue, &len, &alloc);
        if (ctxt->input->base != base) {
            if ((attvalue != NULL) && (alloc != 0))
            attvalue = NULL;
            goto base_changed;

After returning from xmlParseAttribute2() ctxt->wellFormed is correctly set to 0.

And with 32 bit libxml2 I'm getting ctxt->input->base different than base. Which means realloc() returned different pointer than it was given. And due the fact that "wellFormed" is zero no other error message is given.

But with 64 bit libxml2 I have ctxt->input->base the same as base (realloc() returned the same pointer) and thus it goes later to 'failed' label where extra error output is give:

./test/errors/name2.xml:2: parser error : attributes construct error

and later processing reports:

./test/errors/name2.xml:2: parser error : Couldn't find end of Start Tag foo line 1

It would be nice to have consistent error messages for testing. Any comments?



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