"testapi -q" is generating a SEGV on Solaris. 2.6.22 was built with
the Sun C compiler (though I duplicated the SEGV with gcc-3.4.3). From
the coredump:
$ dbx .libs/testapi core
program terminated by signal SEGV (no mapping at the fault address)
0xfecaea90: strlen+0x0050: ld [%o2], %o1
Current function is __xmlRaiseError
497 XML_GET_VAR_STR(msg, str);
(dbx) where
[1] strlen(0x0, 0xfffffaf0, 0x0, 0xffbff858, 0x0, 0x2b), at 0xfecaea90
[2] _ndoprnt(0xff337956, 0xffbffa00, 0xffbff199, 0x0, 0x0, 0x0), at
0xfed135e4
[3] vsnprintf(0x1ebf28, 0x96, 0xff337934, 0xffbff9fc, 0x7ffffc00,
0xfed6c950), at 0xfed15c64
=>[4] __xmlRaiseError(schannel = 0x3f690 =
&`testapi`testapi.c`structured_errors(void *userData, xmlErrorPtr error),
channel = 0xff1724d8 = &xmlParserWarning(void *ctx, const char *msg, ...), data
= (nil), ctx = 0x13fb78, nod = (nil), domain = 8, code = 1549, level =
XML_ERR_WARNING, file = (nil), line = 0, str1 = (nil), str2 = (nil), str3 =
(nil), int1 = 0, col = 0, msg = 0xff337934 "failed to load external entity
"%s"\n", ...), line 497 in "error.c"
[5] __xmlLoaderErr(ctx = 0x13fb78, msg = 0xff337934 "failed to load external
entity "%s"\n", filename = (nil)), line 430 in "xmlIO.c"
[6] xmlNewInputFromFile(ctxt = 0x13fb78, filename = (nil)), line 1496 in
"parserInternals.c"
[7] test_xmlNewInputFromFile(), line 15995 in "testapi.c"
[8] test_parserInternals(), line 16607 in "testapi.c"
[9] testlibxml2(), line 1211 in "testapi.c"
[10] main(argc = 2, argv = 0xffbffcb4), line 141 in "testapi.c"
In error.c, test_xmlNewInputFromFile(), we have:
for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
mem_base = xmlMemBlocks();
ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
filename = gen_filepath(n_filename, 1);
gen_filepath() looks like:
#define gen_nb_filepath 8
static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return("missing.xml");
if (no == 1) return("<foo/>");
if (no == 2) return("test/ent2");
if (no == 3) return("test/valid/REC-xml-19980210.xml");
if (no == 4) return("test/valid/dtds/xhtml1-strict.dtd");
if (no == 5) return(REMOTE1GOOD);
if (no == 6) return(REMOTE1BAD);
return(NULL);
}
So, when no == 7, filename = NULL. Should xmlNewInputFromFile() return
NULL if its filename argument is NULL like it does if its ctx argument
is NULL?
--
albert chin ([EMAIL PROTECTED])
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml