[cfe-dev] [libc++] iostream problem on Linux?

İsmail Dönmez ismail at donmez.ws
Wed Sep 11 04:34:54 PDT 2013


Hi,

Using:

clang r190394
libc++ r190513
libc++abi r190513
Linux x86-64

The following program:

#include <iostream>
using namespace std;

int main()
{
    cout << "foo" << endl;
    return 0;
}


crashes with:

terminating with uncaught exception of type std::bad_cast: std::bad_cast
[1]    24931 abort      ./a.out

gdb trace shows:

(gdb) bt
#0  0x00007ffff6fad849 in raise () from /lib64/libc.so.6
#1  0x00007ffff6faecd8 in abort () from /lib64/libc.so.6
#2  0x00007ffff7b9ebc7 in abort_message (format=<optimized out>) at
../src/abort_message.cpp:47
#3  0x00007ffff7b9ed2d in default_terminate_handler () at
../src/cxa_default_handlers.cpp:62
#4  0x00007ffff7bd4003 in std::__terminate (func=0x6168) at
../src/cxa_handlers.cpp:67
#5  0x00007ffff7bd37d2 in failed_throw (exception_header=<optimized out>)
at ../src/cxa_exception.cpp:147
#6  __cxa_throw (thrown_object=0x605090, tinfo=<optimized out>,
dest=<optimized out>) at ../src/cxa_exception.cpp:242
#7  0x00007ffff788e718 in std::__1::locale::__imp::use_facet(long) const ()
from /usr/lib64/libc++.so.1
#8  0x00007ffff788f081 in
std::__1::locale::use_facet(std::__1::locale::id&) const () from
/usr/lib64/libc++.so.1
#9  0x00000000004018e3 in std::__1::basic_ostream<char,
std::__1::char_traits<char> >& std::__1::endl<char,
std::__1::char_traits<char> >(std::__1::basic_ostream<char,
std::__1::char_traits<char> >&) ()
#10 0x0000000000401403 in main ()


Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130911/6ff49e74/attachment.html>


More information about the cfe-dev mailing list