<div dir="ltr">Hi,<div><br></div><div>Using:</div><div><br></div><div>clang r190394</div><div>libc++ r190513</div><div>libc++abi r190513</div><div>Linux x86-64</div><div><br></div><div>The following program:</div><div><br>

</div><div><div>#include <iostream></div><div>using namespace std;</div><div><br></div><div>int main()</div><div>{</div><div>    cout << "foo" << endl;</div><div>    return 0;</div><div>}</div>

</div><div><br></div><div><br></div><div>crashes with:</div><div><br></div><div><div>terminating with uncaught exception of type std::bad_cast: std::bad_cast</div><div>[1]    24931 abort      ./a.out</div></div><div><br>
</div>
<div>gdb trace shows:</div><div><br></div><div><div>(gdb) bt</div><div>#0  0x00007ffff6fad849 in raise () from /lib64/libc.so.6</div><div>#1  0x00007ffff6faecd8 in abort () from /lib64/libc.so.6</div><div>#2  0x00007ffff7b9ebc7 in abort_message (format=<optimized out>) at ../src/abort_message.cpp:47</div>

<div>#3  0x00007ffff7b9ed2d in default_terminate_handler () at ../src/cxa_default_handlers.cpp:62</div><div>#4  0x00007ffff7bd4003 in std::__terminate (func=0x6168) at ../src/cxa_handlers.cpp:67</div><div>#5  0x00007ffff7bd37d2 in failed_throw (exception_header=<optimized out>) at ../src/cxa_exception.cpp:147</div>

<div>#6  __cxa_throw (thrown_object=0x605090, tinfo=<optimized out>, dest=<optimized out>) at ../src/cxa_exception.cpp:242</div><div>#7  0x00007ffff788e718 in std::__1::locale::__imp::use_facet(long) const () from /usr/lib64/libc++.so.1</div>

<div>#8  0x00007ffff788f081 in std::__1::locale::use_facet(std::__1::locale::id&) const () from /usr/lib64/libc++.so.1</div><div>#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> >&) ()</div>

<div>#10 0x0000000000401403 in main ()</div></div><div><br></div><div><br></div><div>Any ideas?</div><div><br></div></div>