You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Christian Kühling <ch...@gmail.com> on 2008/08/29 22:23:30 UTC
SIGFPE in XalanTransformer::initialize()
Hello,
please see the attached stack trace where a SIGFPE occurs during
static initialization of Xalan.
The Xalan version used is the source distribution 1.10 linked against
2.8 and ICU 3.8.1. Compiled on Suse Linux with gcc 4.2.1.
Is it possible that the zero-division occurs because I am not using
the recommended xerces and icu versions?
Thank you for any pointers to what else could do harm here.
Regards,
Christian Kühling
GNU gdb 6.6.50.20070726-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /local/ckuehlin/demaq_build/src/tools/editor/editor
[Thread debugging using libthread_db enabled]
[New Thread 0xb3e746d0 (LWP 24681)]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb3e746d0 (LWP 24681)]
0xb4c9ffdd in xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::Function const*,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >::doHash
(
this=0xb516c300, key=@0xbfc424e8, modulus=0) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/Include/XalanMap.hpp:576
576 return m_hash(key) % modulus;
(gdb) bt
#0 0xb4c9ffdd in xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::Function const*,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >::doHash
(
this=0xb516c300, key=@0xbfc424e8, modulus=0) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/Include/XalanMap.hpp:576
#1 0xb4ca001e in xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::Function const*,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >::doHash
(
this=0xb516c300, key=@0xbfc424e8) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/Include/XalanMap.hpp:581
#2 0xb4ca8760 in xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::Function const*,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString>
>::doCreateEntry (this=0xb516c300, key=@0xbfc424e8, data=0x0) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/Include/XalanMap.hpp:488
#3 0xb4ca8a02 in xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::XalanMap<xalanc_1_10::XalanDOMString,
xalanc_1_10::Function const*,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString> >,
xalanc_1_10::XalanMapKeyTraits<xalanc_1_10::XalanDOMString>
>::operator[] (this=0xb516c300, key=@0xbfc424e8) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/Include/XalanMap.hpp:382
#4 0xb4c9b0af in
xalanc_1_10::XPathEnvSupportDefault::updateFunctionTable
(theTable=@0xb516c300, theNamespace=@0xbfc424e8,
functionName=@0xbfc424d4, function=0xb516d258) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XPath/XPathEnvSupportDefault.cpp:137
#5 0xb4c9b34d in
xalanc_1_10::XPathEnvSupportDefault::installExternalFunctionGlobal
(theNamespace=@0xbfc424e8, functionName=@0xbfc424d4,
function=@0xb516d258) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XPath/XPathEnvSupportDefault.cpp:189
#6 0xb4e52e9c in
xalanc_1_10::XalanExtensionsInstaller::doInstallGlobal
(theManager=@0x8405bf8, theNamespace=0xb5088580,
theFunctionTable=0xb514ff60) at
/home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XalanExtensions/XalanExtensions.cpp:278
#7 0xb4e52f31 in xalanc_1_10::XalanExtensionsInstaller::installGlobal
(theManager=@0x8405bf8)
at /home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XalanExtensions/XalanExtensions.cpp:217
#8 0xb4e57c67 in
xalanc_1_10::XalanTransformer::EnsureFunctionsInstallation::install
(this=0xbfc4256c)
at /home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.cpp:1417
#9 0xb4e5ae51 in xalanc_1_10::XalanTransformer::initialize
(theManager=@0x8405bf8)
at /home/ckuehlin/xalan110src/xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.cpp:200
Re: SIGFPE in XalanTransformer::initialize()
Posted by Christian Kühling <ch...@gmail.com>.
> I built all of the packages on OpenSUSE 10.3 with your options and ran
> Xalan-C's conformance test suite without any problems.
>
> I'm not sure what your application is doing, but something is wrong with
> static initialization of the libraries.
Thank you for your efforts!
I (kind of) 'solved' the problem by initializing Xalan directly from
the application that links against a library that uses Xalan. (The
application itself is not using Xalan.)
Regards,
Christian
Re: SIGFPE in XalanTransformer::initialize()
Posted by David Bertoni <db...@apache.org>.
Christian Kühling wrote:
> On Sat, Aug 30, 2008 at 01:36, David Bertoni <db...@apache.org> wrote:
>> Neither Xalan-C 1.10 nore Xerces-C 2.8 are compatible with ICU 3.8.1 if you
>> use the ICU message loading option. You should use ICU 3.2 1 instead, or
>> make sure you build both libraries with -m inmem.
>
> The following runConfigure calls were used to build ICU, Xerces and Xalan:
>
> ICU:
> ./runConfigureICU --enable-debug Linux --prefix=/home/ckuehlin/icu381
>
> Xerces:
> ./runConfigure -p linux -c gcc -x g++ -d -t icu -b 32 -l
> -L/home/ckuehlin/icu381/lib -P /home/ckuehlin/xerces28bin
>
> Xalan
> ./runConfigure -p linux -c gcc -x g++ -t icu -r pthread -b 32 -l
> -L/home/ckuehlin/xerces28bin/lib -l -L/home/ckuehlin/icu381/lib -P
> /home/ckuehlin/xalan110bin
>
> Relevant environment parameters were
>
> export XERCESCROOT=/home/ckuehlin/xerces28src/xerces-c-src_2_8_0
> export ICUROOT=/home/ckuehlin/icu381
> export XALANCROOT=/home/ckuehlin/xalan110src/xml-xalan/c
> export XALAN_USE_ICU=true
>
>
>> Can you be more specific about what version of SUSE you're running?
>
> It's Opensuse 10.3 with its default packages. (Both gcc and g++ 4.2.1)
> I am able to reproduce the problem with the default packages of icu,
> xerces and xalan of this distribution. (ICU 3.6, Xerces 2.7.0, Xalan
> 1.10)
>
> I have the remote suspicion that somehow the initializers get invoked
> more than once (bypassing the project's central initializer singleton)
> but I have to investigate this further in order to come up with a
> small example exhibiting the same behaviour.
I built all of the packages on OpenSUSE 10.3 with your options and ran
Xalan-C's conformance test suite without any problems.
I'm not sure what your application is doing, but something is wrong with
static initialization of the libraries.
Dave
Re: SIGFPE in XalanTransformer::initialize()
Posted by Christian Kühling <ch...@gmail.com>.
On Sat, Aug 30, 2008 at 01:36, David Bertoni <db...@apache.org> wrote:
> Neither Xalan-C 1.10 nore Xerces-C 2.8 are compatible with ICU 3.8.1 if you
> use the ICU message loading option. You should use ICU 3.2 1 instead, or
> make sure you build both libraries with -m inmem.
The following runConfigure calls were used to build ICU, Xerces and Xalan:
ICU:
./runConfigureICU --enable-debug Linux --prefix=/home/ckuehlin/icu381
Xerces:
./runConfigure -p linux -c gcc -x g++ -d -t icu -b 32 -l
-L/home/ckuehlin/icu381/lib -P /home/ckuehlin/xerces28bin
Xalan
./runConfigure -p linux -c gcc -x g++ -t icu -r pthread -b 32 -l
-L/home/ckuehlin/xerces28bin/lib -l -L/home/ckuehlin/icu381/lib -P
/home/ckuehlin/xalan110bin
Relevant environment parameters were
export XERCESCROOT=/home/ckuehlin/xerces28src/xerces-c-src_2_8_0
export ICUROOT=/home/ckuehlin/icu381
export XALANCROOT=/home/ckuehlin/xalan110src/xml-xalan/c
export XALAN_USE_ICU=true
> Can you be more specific about what version of SUSE you're running?
It's Opensuse 10.3 with its default packages. (Both gcc and g++ 4.2.1)
I am able to reproduce the problem with the default packages of icu,
xerces and xalan of this distribution. (ICU 3.6, Xerces 2.7.0, Xalan
1.10)
I have the remote suspicion that somehow the initializers get invoked
more than once (bypassing the project's central initializer singleton)
but I have to investigate this further in order to come up with a
small example exhibiting the same behaviour.
Christian
Re: SIGFPE in XalanTransformer::initialize()
Posted by David Bertoni <db...@apache.org>.
Christian Kühling wrote:
> Hello,
>
> please see the attached stack trace where a SIGFPE occurs during
> static initialization of Xalan.
>
> The Xalan version used is the source distribution 1.10 linked against
> 2.8 and ICU 3.8.1. Compiled on Suse Linux with gcc 4.2.1.
Neither Xalan-C 1.10 nore Xerces-C 2.8 are compatible with ICU 3.8.1 if
you use the ICU message loading option. You should use ICU 3.2 1
instead, or make sure you build both libraries with -m inmem.
>
> Is it possible that the zero-division occurs because I am not using
> the recommended xerces and icu versions?
>
> Thank you for any pointers to what else could do harm here.
I cannot reproduce the problem. Clearly the modulus parameter is 0,
which explains the FPE, but I can't figure out how it got that way.
Can you be more specific about what version of SUSE you're running?
Dave