libxml2-2.9.8 ./.libs/runtest throws SIGSEGV from strlen() call
On a Solaris 10 Sparc server. Well patched up to date. Using the Oracle Studio 12.6 C99 compiler tools.
Everything goes smoothly in the config and compile.
In config.log :
It was created by configure, which was generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-threads --with-iconv=/usr/local --with-zlib=/usr/local --enable-dependency-tracking --enable-shared --enable-
static --enable-rebuild-docs=yes --prefix=/usr/local
## --------- ##
## Platform. ##
## --------- ##
hostname = corv
uname -m = sun4u
uname -r = 5.10
uname -s = SunOS
uname -v = Generic_150400-61
/usr/bin/uname -p = sparc
/bin/uname -X = System = SunOS
Node = corv
Release = 5.10
KernelID = Generic_150400-61
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 8
/bin/arch = sun4
/usr/bin/arch -k = sun4u
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/xpg6/bin
PATH: /usr/xpg4/bin
PATH: /usr/ccs/bin
PATH: /opt/developerstudio12.6/bin
PATH: /sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/sbin
Configure seemed happy :
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... /opt/developerstudio12.6/bin/c99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/developerstudio12.6/bin/c99 accepts -g... yes
checking for /opt/developerstudio12.6/bin/c99 option to accept ISO C89... none needed
checking whether /opt/developerstudio12.6/bin/c99 understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of /opt/developerstudio12.6/bin/c99... dashXmstdout
checking whether ln -s works... yes
checking how to run the C preprocessor... /opt/developerstudio12.6/bin/c99 -E
checking for mv... /usr/xpg4/bin/mv
checking for tar... /bin/tar
checking for perl... /usr/local/bin/perl
checking for wget... /usr/bin/wget
checking for xmllint... /bin/xmllint
checking for xsltproc... /bin/xsltproc
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/xpg4/bin/sed
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for fgrep... /usr/xpg4/bin/grep -F
checking for non-GNU ld... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/xpg4/bin/nm -p
checking the name lister (/usr/xpg4/bin/nm -p) interface... BSD nm
checking the maximum length of command line arguments... 786240
checking how to convert sparc-sun-solaris2.10 file names to sparc-sun-solaris2.10 format... func_convert_file_noop
checking how to convert sparc-sun-solaris2.10 file names to toolchain format... func_convert_file_noop
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/xpg4/bin/nm -p output from /opt/developerstudio12.6/bin/c99 object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking for /opt/developerstudio12.6/bin/c99 option to produce PIC... -KPIC -DPIC
checking if /opt/developerstudio12.6/bin/c99 PIC flag -KPIC -DPIC works... yes
checking if /opt/developerstudio12.6/bin/c99 static flag -Bstatic works... yes
checking if /opt/developerstudio12.6/bin/c99 supports -c -o file.o... yes
checking if /opt/developerstudio12.6/bin/c99 supports -c -o file.o... (cached) yes
checking whether the /opt/developerstudio12.6/bin/c99 linker (/usr/ccs/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
Checking zlib
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzread in -lz... yes
Checking lzma
checking for LZMA... no
checking lzma.h usability... no
checking lzma.h presence... no
checking for lzma.h... no
Checking headers
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for stdlib.h... (cached) yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for arpa/nameser.h... yes
checking for resolv.h... yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking for dlfcn.h... (cached) yes
Checking types
checking for uint32_t... yes
Checking libraries
checking for strftime... yes
checking for strftime... (cached) yes
checking for localtime... yes
checking for gettimeofday... yes
checking for ftime... yes
checking for stat... yes
checking for signal... yes
checking for rand... yes
checking for rand_r... yes
checking for srand... yes
checking for time... yes
checking for isascii... yes
checking for mmap... yes
checking for munmap... yes
checking for putenv... yes
checking for va_copy... yes
checking whether va_list is an array type... yes
checking for library containing gethostent... -lnsl
checking for library containing setsockopt... -lsocket
checking for library containing connect... none required
checking for type of socket length (socklen_t)... socklen_t *
checking for const gethostbyname() argument... yes
checking for const send() second argument... yes
checking whether to enable IPv6... yes
checking struct sockaddr::ss_family... yes
checking for getaddrinfo... yes
checking for isnan... yes
checking for isinf... no
checking for isinf in -lm... no
Found python in /bin/python
Found Python version 2.6
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... yes
Checking configuration requirements
Enabling multithreaded support
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_join in -lpthread... yes
Enabled Schematron support
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
Disabling ICU support
Enabled Schemas/Relax-NG support
checking for printf... yes
checking for sprintf... yes
checking for fprintf... yes
checking for snprintf... yes
checking for vfprintf... yes
checking for vsprintf... yes
checking for vsnprintf... yes
checking for sscanf... yes
Disabling code coverage for GCC
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libxml2.spec
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/libxml/Makefile
config.status: creating doc/Makefile
config.status: creating doc/examples/Makefile
config.status: creating doc/devhelp/Makefile
config.status: creating example/Makefile
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating xstc/Makefile
config.status: creating include/libxml/xmlversion.h
config.status: creating libxml-2.0.pc
config.status: creating libxml-2.0-uninstalled.pc
config.status: creating libxml2-config.cmake
config.status: creating python/setup.py
config.status: creating xml2-config
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Done configuring
Simply put the "make check" stage fails with a SIGSEGV :
. . .
gmake[4]: Nothing to be done for 'all'.
gmake[4]: Leaving directory '/usr/local/build/libxml2-2.9.8_SunOS5.10_sparc64vii+.001/python/tests'
gmake[3]: Leaving directory '/usr/local/build/libxml2-2.9.8_SunOS5.10_sparc64vii+.001/python'
gmake[2]: Leaving directory '/usr/local/build/libxml2-2.9.8_SunOS5.10_sparc64vii+.001/python'
gmake[1]: Leaving directory '/usr/local/build/libxml2-2.9.8_SunOS5.10_sparc64vii+.001'
CC runtest.o
"runtest.c", line 592: warning: implicit function declaration: strdup
"runtest.c", line 592: warning: improper pointer/integer combination: op "="
"runtest.c", line 3893: warning: improper pointer/integer combination: op "="
"runtest.c", line 3896: warning: improper pointer/integer combination: op "="
"runtest.c", line 3900: warning: improper pointer/integer combination: op "="
CCLD runtest
CC testrecurse.o
"testrecurse.c", line 637: warning: implicit function declaration: strdup
"testrecurse.c", line 637: warning: improper pointer/integer combination: op "="
CCLD testrecurse
CC testapi.o
"testapi.c", line 126: warning: implicit function declaration: putenv
CCLD testapi
CC testchar.o
CCLD testchar
CC testdict.o
CCLD testdict
CC runxmlconf.o
CCLD runxmlconf
[ -d test ] || ln -s ./test .
[ -d result ] || ln -s ./result .
./runtest && \
./testrecurse && \
ASAN_OPTIONS="$ASAN_OPTIONS:detect_leaks=0" ./testapi && \
./testchar && \
./testdict && \
./runxmlconf
Missing result file /bin/bash: line 5: 19999 Segmentation Fault (core dumped) ./runtest
gmake: *** [Makefile:1914: runtests] Error 139
corv $
So let's look at the core dump.
corv $ find . -type f -name runtest -ls
2799171 5 -rwxr-xr-x 1 dclarke devl 6326 Oct 18 02:15 ./runtest
2799169 53 -rwxr-xr-x 1 dclarke devl 112056 Oct 18 02:15 ./.libs/runtest
corv $
corv $
corv $ dbx ./.libs/runtest time_1539828927-pid_19999-uid_16411-gid_20002-fid_runtest.core
Reading runtest
core file header read successfully
Reading ld.so.1
Reading libxml2.so.2.9.8
Reading libpthread.so.1
Reading libz.so.1.2.11
Reading libm.so.2
Reading libsocket.so.1
Reading libnsl.so.1
Reading libc.so.1
Reading libc_psr.so.1
Reading geniconvtbl.so
Reading libgen.so.1
t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
0xffffffff7df3c890: strlen+0x0050: ld [%o2], %o1
(dbx) where
current thread: t@1
=>[1] strlen(0x12a0e0, 0x14, 0x12a0e0, 0x1c8c, 0x0, 0x14c), at 0xffffffff7df3c890
[2] _ndoprnt(0x100011276, 0xffffffff7ffff580, 0xffffffff7dfab1b8, 0xffffffff7e14e160, 0x12a0e0, 0x100011275), at 0xffffffff7dfacf64
[3] _fprintf(0xffffffff7e149740, 0x100011260, 0x0, 0x0, 0x100004c7c, 0xffffffff7e13e000), at 0xffffffff7dfaf028
[4] launchTests(0x100113d80, 0x100113d80, 0x0, 0xffffffff7e1496e4, 0xffffffff7e13e000, 0x18), at 0x10000f918
[5] runtest(0x0, 0x1000083a0, 0x100113d80, 0xffffffff7e14bf04, 0xffffffff7e100200, 0x4), at 0x10000fe54
[6] main(0x1, 0xffffffff7ffff8f8, 0xffffffff7ffff908, 0xffffffff7df4ca90, 0xffffffff7e300100, 0xffffffff7e100200), at 0x1000102a4
(dbx) list
dbx: warning: No source file
(dbx) quit
corv $
So that is interesting.