On 9/3/2010 1:19 AM, Jasmine_Shaikh wrote:
The second assert in invariant fails intermittently and that too only on the
aix machine. The issue is not reproducible and I am not able to conclude
anything from the core file that we got from client side.
I am using 1.2 version of Xalan. Then newer versions of Xalan implements
invariant differently.
1.2 version of invariants:
void invariants() const
{
#if !defined(NDEBUG)
assert((m_data.size() == 0&& m_size == 0) || m_size ==
m_data.size() -
1);
assert(m_data.size() == 0 || m_data.back() == 0);
#endif
}
1.10 version of invariants:
void invariants() const
{
#if !defined(NDEBUG)
assert((m_data.empty() == true&& m_size == 0) || m_size ==
m_data.size()
- 1);
assert(m_data.empty() == true || m_data.back() == 0);
#endif
}
Does the new implementation fix anything?
No. It was changed because XalanDOMStringbused to be implemented using
std::vector<XalanDOMChar> and std::string::empty() performs better than
std::string::size() == 0 on some platforms.
You might want to build a debug version of the processor to see if you
can get a usable core file when the assert is triggered. Also, please
post the backtrace from the core file.
Otherwise, it will be extremely difficult to fix this, as version 1.2 is
almost 10 years old.
Dave