[xml] xmlRead Memory



I have compiled a shared library in another application and I am using libxml2-2.6.30 library functions in the shared lib to help parse in-memory XML.
 
Following is the Makefile I used for compiling the shared lib:
 
=============================================
GCCLIBPATH=/usr/local/lib:/opt/ar/sdi/sonic_adapter/SonicCClient6.1-FCS/Solaris_GCC/bin/release
GCCPATH=/usr/local/bin/gcc
ARCHTYPE=SOLARIS_GCC
SMQROOT=/opt/ar/sdi/sonic_adapter/SonicCClient6.1-FCS/Solaris_GCC
BUILDMODE=release

# Compiler flags.
CC=gcc
CC=/usr/local/bin/gcc
CC=/usr/local/bin/sparc-sun-solaris2.8-gcc
CC=${GCCPATH}
LD=/usr/ccs/bin/ld
CFLAGS="-D_REENTRANT -L${GCCLIBPATH} -lnsl -lsmq -lstdc++ -lsocket -lrt  -lpthread -I/opt/ar/gemsdev/api/include -I/opt/ar/sdi/sonic_adapter/SonicCClient6.1-FCS/Solaris_GCC/include -Ilibxml -I/opt/ar/sdi/libxml2/libxml2-2.6.30/include"

LDFLAGS="-G"

CPPFLAGS="-I/tmp/TSO1 -I/usr/include"
LDLIBS="-lnsl -lw -lpthread -lxml2"


$CC $CPPFLAGS $CFLAGS -DUNIX -D$ARCHTYPE -I$SMQROOT/include -L$SMQROOT/bin/$BUILDMODE $LDLIBS $LDFLAGS -o $1.so $1.c
exit
============================================

The shared lib is loaded as a multithreaded plugin in a daemon on Solaris 10.

The problem is that when the code in the attached file runs for the second time it crashes at line 44. The first run has no problems.

Any pointers? Please help.

Thanks in advance,

Arthur

Attachment: code_in_question.txt
Description: Text document



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