Re: [xml] Core while parsing



On Fri, Nov 19, 2004 at 09:57:08AM +0100, Volker Roth wrote:
I have tested it with
Libxml2 2.6.7, 2.6.14 and 2.6.16

[...]

<rtc> Read from unallocated (rua):
Attempting to read 4 bytes at address 0xc in page zero
=>[1] vfprintf(0x0, 0x2b53a8, 0xffbfe77c, 0x1, 0x0, 0xffbfe730), at
0xf3587734
  [2] xmlGenericErrorDefaultFunc(ctx = (nil), msg = 0x2b53a8 "%s:%d: ",
...), line 73 in "error.c"

I cannot reconciliate your trace with the actual code of the function:

/**
 * xmlGenericErrorDefaultFunc:
 * @ctx:  an error context
 * @msg:  the message to display/transmit
 * @...:  extra parameters for the message display
 *
 * Default handler for out of context error messages.
 */
void
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
    va_list args;
                                                                                
    if (xmlGenericErrorContext == NULL)
        xmlGenericErrorContext = (void *) stderr;
                                                                                
    va_start(args, msg);
    vfprintf((FILE *)xmlGenericErrorContext, msg, args);
    va_end(args);
}

  ctx passed is NULL, no big deal we do not use it.
Then vfprintf is called on a NULL file while it explicitely check and
correct if xmlGenericErrorContext is NULL to use stderr. If your stderr
is NULL, well I don't know what you did but this sounds awfully broken.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://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]