RE: [xml] Segfault on AIX



hi!

have you compiled statically or dynamically ?
with gcc or the ibm cc (at least 3.6.6) ?

does "libXML 2.2.4.16" you got it as package either 
from the bull/freeware site or the freeware cd of
AIX 5.1 ?


-- Alfred Reibenschuh, perl geek
look @ http://penguin.at0.net/~fredo/geekcode.txt
Welcome to the Karma Hotel
Looks like Heaven but could be Hell
Where pleasant screams transform to yells
And every suite casts its own spell




-----Original Message-----
From: xml-admin gnome org [mailto:xml-admin gnome org]On Behalf Of Alan
Aspuru-Guzik
Sent: Thursday, February 28, 2002 11:52 PM
To: xml gnome org
Cc: alan aspuru com
Subject: [xml] Segfault on AIX


Dear XML users,

I am puzzled by the following behavior: My code runs and parses XML
correctly in a plain-vanilla RH7.1+XimianGnome box, but when I compile in
an IBM SP supercomputer (AIX) using the latest libXML out of the box
(libXML 2.2.4.16) with and without my own libZ in --prefix=$HOME, when I
try to open a simple xml file (not gzipped),

I get the following segfault:
Stack Trace
     .gzopen,               FP=2ff221b0
C    .xmlGzfileOpen,        FP=2ff221b0
C    ...arserInputBufferCreateFilename, FP=2ff221f0
C    .xmlNewInputFromFile,  FP=2ff22248
C    .xmlDefaultExternalEntityLoader, FP=2ff22298
C    .xmlLoadExternalEntity, FP=2ff222e8
C    .xmlCreateFileParserCtxt, FP=2ff22320
C    .xmlSAXParseFileWithData, FP=2ff22368
C    .xmlSAXParseFile,      FP=2ff223b8
C    .xmlParseFile,         FP=2ff223f0
C    .p_read_xml_file,      FP=2ff22428
C    .main,                 FP=2ff22470
     .__start,              FP=2ff224c0

Just for sanity check, I include the Stack Frame and source code lines
where the thing 'leaves' my code and enters libXML:

Stack Frame
Function ".p_read_xml_file":
  fname (R31):     0x200010c8 -> "psi.xml"
  u (R28):         0x200012b8 -> 0x00000003 (3)

And here are the offending lines:

gboolean p_read_xml_file(char *fname, PsiData u)
{
    xmlDocPtr doc;
    xmlNsPtr ns;
    xmlNodePtr cur;
    
    /*
     * build an XML tree from a the file;
     */

    if(fname==NULL) {
        g_error("NULL XML filename.\n Exiting!\n");
    }
    
**    doc = xmlParseFile(fname);
    if (doc == NULL)
        {
            g_error("Input filename: %s is not a valid XML file!\n
Exiting!\n",
                    fname);
        }

(... code continues ...)

The code dies entering the doc= xmlParseFile(fname);

I tried looking in the mailing lists and bugzilla, but I find not a clue
about this. I attach the libxml config.log on the computer I am compiling
in.. (AIX 4.3.3 with GCC)

blue199:./configure --prefix=$HOME
loading cache ./config.cache
checking host system type... powerpc-ibm-aix4.3.3.0
checking for a BSD compatible
install... (cached) /usr/local/gnu/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes

What puzzles me also is why gzopen() if the xml file is not gzipped?

Thanks a lot in advance, 

Alan Aspuru-Guzik






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