You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Sean Pearce (JIRA)" <xa...@xml.apache.org> on 2005/12/02 16:58:32 UTC

[jira] Created: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
----------------------------------------------------------------------------

         Key: XALANC-588
         URL: http://issues.apache.org/jira/browse/XALANC-588
     Project: XalanC
        Type: Bug
  Components: XalanC  
    Versions: 1.10    
 Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10

$ CC -V
CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
$ cc -V
cc: Sun C 5.7 Patch 117837-04 2005/05/11
usage: cc [ options] files.  Use 'cc -flags' for details

    Reporter: Sean Pearce


A couple of issues.

Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10

1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)

2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
void
DoubleSupport::initialize()
{
#if defined(XALAN_NO_STD_NUMERIC_LIMITS)
    // We initialize this at here because some
    // platforms have had issues with signals
    // if we call sqrt(-2.01) during static
    // initialization.
#if defined(XALAN_STRICT_ANSI_HEADERS)
    s_NaN.d = std::sqrt(-2.01);
#else
    s_NaN.d = sqrt(-2.01);
#endif
#elif !defined(XALAN_NO_STD_NAMESPACE)
    // There seems to be problems with various standard libraries, so
    // this is disabled for now.  We need to revisit this when we
    // update our autoconf/automake system to detect the right value
    // for NaN at configuration time.
    // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
#endif

Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-588?page=comments#action_12359195 ] 

David Bertoni commented on XALANC-588:
--------------------------------------

The problem here is Sun's compiler and standard library are wildly inconsistent.  Solaris SPARC _requires_ XALAN_NO_STD_NUMERIC_LIMITS while their x86 compiler doesn't.  In addition, SPARC does not generate a floating point exception, while apparently the x86 compiler does.  This behavior also seems different from building with the 32-bit x86 Sun compiler, which does not exhibit this problem.

There are two things we need to investigate:

1. Can you please verify that your application does not make any changes to the default floating point behavior of the application.

2. If your application does not explicitly modify the default floating point behavior, the best choice here would be to determine if  a compiler option exists to change this behavior.  Since XPath conformance requires arbitrary floating point calculation, and NaN is a valid result in many cases, Xalan-C would not be conformant this behavior is not changed..

If possible, could you investigate whether the compiler supports such an option?

Thanks!

> Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
> ----------------------------------------------------------------------------
>
>          Key: XALANC-588
>          URL: http://issues.apache.org/jira/browse/XALANC-588
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: 1.10
>  Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10
> $ CC -V
> CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
> $ cc -V
> cc: Sun C 5.7 Patch 117837-04 2005/05/11
> usage: cc [ options] files.  Use 'cc -flags' for details
>     Reporter: Sean Pearce

>
> A couple of issues.
> Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
> Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
> Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10
> 1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)
> 2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
> void
> DoubleSupport::initialize()
> {
> #if defined(XALAN_NO_STD_NUMERIC_LIMITS)
>     // We initialize this at here because some
>     // platforms have had issues with signals
>     // if we call sqrt(-2.01) during static
>     // initialization.
> #if defined(XALAN_STRICT_ANSI_HEADERS)
>     s_NaN.d = std::sqrt(-2.01);
> #else
>     s_NaN.d = sqrt(-2.01);
> #endif
> #elif !defined(XALAN_NO_STD_NAMESPACE)
>     // There seems to be problems with various standard libraries, so
>     // this is disabled for now.  We need to revisit this when we
>     // update our autoconf/automake system to detect the right value
>     // for NaN at configuration time.
>     // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
> #endif
> Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Assigned: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-588?page=all ]

David Bertoni reassigned XALANC-588:
------------------------------------

    Assign To: David Bertoni

> Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
> ----------------------------------------------------------------------------
>
>          Key: XALANC-588
>          URL: http://issues.apache.org/jira/browse/XALANC-588
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: 1.10
>  Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10
> $ CC -V
> CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
> $ cc -V
> cc: Sun C 5.7 Patch 117837-04 2005/05/11
> usage: cc [ options] files.  Use 'cc -flags' for details
>     Reporter: Sean Pearce
>     Assignee: David Bertoni

>
> A couple of issues.
> Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
> Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
> Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10
> 1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)
> 2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
> void
> DoubleSupport::initialize()
> {
> #if defined(XALAN_NO_STD_NUMERIC_LIMITS)
>     // We initialize this at here because some
>     // platforms have had issues with signals
>     // if we call sqrt(-2.01) during static
>     // initialization.
> #if defined(XALAN_STRICT_ANSI_HEADERS)
>     s_NaN.d = std::sqrt(-2.01);
> #else
>     s_NaN.d = sqrt(-2.01);
> #endif
> #elif !defined(XALAN_NO_STD_NAMESPACE)
>     // There seems to be problems with various standard libraries, so
>     // this is disabled for now.  We need to revisit this when we
>     // update our autoconf/automake system to detect the right value
>     // for NaN at configuration time.
>     // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
> #endif
> Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Posted by "Sean Pearce (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-588?page=comments#action_12359168 ] 

Sean Pearce commented on XALANC-588:
------------------------------------

For good measure:

$ uname -a
SunOS xxxx-v40z1 5.10 Generic_Patch i86pc i386 i86pc


> Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
> ----------------------------------------------------------------------------
>
>          Key: XALANC-588
>          URL: http://issues.apache.org/jira/browse/XALANC-588
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: 1.10
>  Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10
> $ CC -V
> CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
> $ cc -V
> cc: Sun C 5.7 Patch 117837-04 2005/05/11
> usage: cc [ options] files.  Use 'cc -flags' for details
>     Reporter: Sean Pearce

>
> A couple of issues.
> Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
> Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
> Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10
> 1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)
> 2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
> void
> DoubleSupport::initialize()
> {
> #if defined(XALAN_NO_STD_NUMERIC_LIMITS)
>     // We initialize this at here because some
>     // platforms have had issues with signals
>     // if we call sqrt(-2.01) during static
>     // initialization.
> #if defined(XALAN_STRICT_ANSI_HEADERS)
>     s_NaN.d = std::sqrt(-2.01);
> #else
>     s_NaN.d = sqrt(-2.01);
> #endif
> #elif !defined(XALAN_NO_STD_NAMESPACE)
>     // There seems to be problems with various standard libraries, so
>     // this is disabled for now.  We need to revisit this when we
>     // update our autoconf/automake system to detect the right value
>     // for NaN at configuration time.
>     // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
> #endif
> Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Posted by "Sean Pearce (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-588?page=comments#action_12366198 ] 

Sean Pearce commented on XALANC-588:
------------------------------------

Hi Daivd,

It's been a long time, but I've discovered the following:

> 1. Can you please verify that your application does not make any changes to the default floating point behavior of the application. 
I think our applciations does modify the default behaviour, in that we catch FPE signals, and handle them internally - by effectively aborting. Maybe in the future we need to be a bit more intelligent, and handle some of these signals a bit differently (on Solaris - our product is cross-platform and runs on many flavours of Unix and Windows).

We have decided to go with the modified compilation of the library as I stated above, because that presently works around our problem(s), and AFAICT we don't require XPath comformity (?) as we only do simple XML transformations with XSL.

Also - we're not presently releasing on the AMD64-bit platform due to other bugs in the Sun Studio 10 compiler on that platform, but if they've fixed those in Sun Studio 11, we may release on that after further testing; It would make life easier if the configure script worked out the binary platform, and chose the correct -xarch option though :)

Hope you find this information of use.

Regards.

> Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
> ----------------------------------------------------------------------------
>
>          Key: XALANC-588
>          URL: http://issues.apache.org/jira/browse/XALANC-588
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: 1.10
>  Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10
> $ CC -V
> CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
> $ cc -V
> cc: Sun C 5.7 Patch 117837-04 2005/05/11
> usage: cc [ options] files.  Use 'cc -flags' for details
>     Reporter: Sean Pearce
>     Assignee: David Bertoni

>
> A couple of issues.
> Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
> Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
> Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10
> 1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)
> 2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
> void
> DoubleSupport::initialize()
> {
> #if defined(XALAN_NO_STD_NUMERIC_LIMITS)
>     // We initialize this at here because some
>     // platforms have had issues with signals
>     // if we call sqrt(-2.01) during static
>     // initialization.
> #if defined(XALAN_STRICT_ANSI_HEADERS)
>     s_NaN.d = std::sqrt(-2.01);
> #else
>     s_NaN.d = sqrt(-2.01);
> #endif
> #elif !defined(XALAN_NO_STD_NAMESPACE)
>     // There seems to be problems with various standard libraries, so
>     // this is disabled for now.  We need to revisit this when we
>     // update our autoconf/automake system to detect the right value
>     // for NaN at configuration time.
>     // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
> #endif
> Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Resolved: (XALANC-588) Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XALANC-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni resolved XALANC-588.
----------------------------------

       Resolution: Fixed
    Fix Version/s: CurrentCVS

> Floating point exceptions in DoubleSupport::initialize() on Solaris 10 (x86)
> ----------------------------------------------------------------------------
>
>                 Key: XALANC-588
>                 URL: https://issues.apache.org/jira/browse/XALANC-588
>             Project: XalanC
>          Issue Type: Bug
>          Components: XalanC
>    Affects Versions: 1.10
>         Environment: Sun Solaris 10, Opteron chipset (x86/i386). XercesC++ 2.7  XalanC 1.10
> $ CC -V
> CC: Sun C++ 5.7 Patch 117831-02 2005/03/30
> $ cc -V
> cc: Sun C 5.7 Patch 117837-04 2005/05/11
> usage: cc [ options] files.  Use 'cc -flags' for details
>            Reporter: Sean Pearce
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>
> A couple of issues.
> Prior to compiling, XERCESCROOT and XALANCROOT are configured to point the their respective foliders, and the configurations used as follows:
> Xerces: ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xerces-c_2_7_0
> Xalan:   ./runConfigure -p solaris -c cc -x CC -b 64 -P $P4SRCROOT/Tools/libs/64/SUN/xalanc_1_10
> 1) To compile on this platform, the 'solaris' entries in runConfigure had to be changed to use option '-xarch=amd64' in place of '-xarch=v9' (for XercesC and XalanC)
> 2) After building the libraries, our program was crashing in XalanTransformer::initialize(); (after calling XMLPlatformUtils::Initialize(); of course), with a Floating Point Exception (FPE) in:
> void
> DoubleSupport::initialize()
> {
> #if defined(XALAN_NO_STD_NUMERIC_LIMITS)
>     // We initialize this at here because some
>     // platforms have had issues with signals
>     // if we call sqrt(-2.01) during static
>     // initialization.
> #if defined(XALAN_STRICT_ANSI_HEADERS)
>     s_NaN.d = std::sqrt(-2.01);
> #else
>     s_NaN.d = sqrt(-2.01);
> #endif
> #elif !defined(XALAN_NO_STD_NAMESPACE)
>     // There seems to be problems with various standard libraries, so
>     // this is disabled for now.  We need to revisit this when we
>     // update our autoconf/automake system to detect the right value
>     // for NaN at configuration time.
>     // XALAN_STATIC_ASSERT(std::numeric_limits<double>::has_quiet_NaN);
> #endif
> Removing  #define XALAN_NO_STD_NUMERIC_LIMITS from the Include/SolarisDefinitions.hpp fixes this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org