anirbb wrote:
Hi David,
We identified the issue is with the following piece of code in
XalanVector.hpp file. The problem was that the variable theDistance which
was getting filled up by distance call was containing garbage and for which
Xalan was trying to allocate some very large memory and was running out of
memory and crashing.
However we faced this issue only in Solaris with CC compiler and when
linked to stlport. It works fine with libCstd.
So we have initialized theDistance to 0 and after that things worked fine.
2 Questions we have:
1. Under what condition do we need to define XALAN_HAS_STD_DISTANCE?
Sigh. It's very difficult to maintain compatibility with a wide variety
of compilers and library combinations. We really need to update the
build system to use autoconf, so we can avoid a lot of these issues.
2. Is our change ok (initialization of theDistance)?
This should be unnecessary, since the distance function should assign
the value 0 to the variable. You might just try defining the macro
XALAN_HAS_STD_DISTANCE in SolarisDefinitions.h, to see if that solves
the problem.
Dave