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?

2. Is our change ok (initialization of theDistance)?
 

size_type

    local_distance(

            const_iterator  theFirst,

            const_iterator  theLast)

    {

        // Since we're using bare pointers for now, we can

        // assert this...

        assert(theFirst <= theLast);

 

#if defined(XALAN_HAS_STD_DISTANCE)

        return XALAN_STD_QUALIFIER distance(theFirst, theLast);

#else

        size_type   theDistance;

 

        XALAN_STD_QUALIFIER distance(theFirst, theLast, theDistance);

 

        return theDistance;

#endif

    }

Regards
Anirban

-- 
View this message in context: 
http://www.nabble.com/Issue-with-xalanc-on-Solaris-when-using-stlport-library-tp22663825p22704736.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.

Reply via email to