[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crash in c++ library (sstream)



Hello everybody

I am using the Etrax LX software version 2.1.0 with linux kernel 2.4.14 and
cris-tools version 2.96.
The whole system crashes, when I try to use the str() method of the
ostringstream class (STL).
This short example code shows the problem:

----------

#include <sstream>
#include <iostream>

int main(int argc, char *argv[])
{
    std::ostringstream os;
    os << "hello" << std::endl;

    std::cout << os.str();  // program crashes here !

    return 0;
}

----------

When "debugging" the code, I found out, that a dynamic_cast<> in sstream
class template failes (crashes).
Does anyone have a patch or work around for this problem ?