<div dir="ltr">Hi,<div><br></div><div>Program</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><locale></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">main</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">argc</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">char</span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">argv</span><span style="color:rgb(0,0,0)">[])</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">locale</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">loc</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">use_facet</span><span style="color:rgb(0,0,0)"><</span>std<span style="color:rgb(0,0,0)">::</span>ctype<span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,128,0)">char</span><span style="color:rgb(0,0,0)">>>(</span><span style="color:rgb(0,0,0)">loc</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">EXIT_SUCCESS</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Crashes with latest libc++ and libc++abi on Linux with backtrace</pre><pre style="margin-top:0px;margin-bottom:0px"><br>
</pre><pre style="margin-top:0px;margin-bottom:0px">(gdb) bt
#0  0xb7fff424 in __kernel_vsyscall ()
#1  0x45abdbaf in raise () from /lib/libc.so.6
#2  0x45abf503 in abort () from /lib/libc.so.6
#3  0xb7fbf43c in abort_message (format=0xb7ff8264 "terminating with %s exception of type %s: %s") at ../src/abort_message.cpp:47
#4  0xb7fbf5f9 in default_terminate_handler () at ../src/cxa_default_handlers.cpp:63
#5  0xb7ff4f04 in std::__terminate (func=0xb7fbf4e0 <default_terminate_handler()>) at ../src/cxa_handlers.cpp:67
#6  0xb7ff44e5 in failed_throw (exception_header=<optimized out>) at ../src/cxa_exception.cpp:147
#7  __cxa_throw (thrown_object=0x804b058, tinfo=0xb7ffce50 <typeinfo for std::bad_cast>, dest=0xb7ff8170 <std::bad_cast::~bad_cast()>) at ../src/cxa_exception.cpp:242
#8  0xb7f14b82 in std::__1::locale::__imp::use_facet (
    this=0xb7fb91a0 <std::__1::locale::__imp& std::__1::(anonymous namespace)::make<std::__1::locale::__imp, unsigned int>(unsigned int)::buf>, id=28)
    at /home/vv/kom/libcxx/src/locale.cpp:432
#9  0xb7f15486 in std::__1::locale::use_facet (this=0xbfffeca0, x=...) at /home/vv/kom/libcxx/src/locale.cpp:574
#10 0x0804878e in main (argc=1, argv=0xbfffed54) at main.cpp:4
</pre></div><div><br></div><div>I have found that 'std::ctype<char>::id.__get()' is 28 for me. I have constexpr enabled.</div><div><br></div><div>Thanks.</div><div><br></div></div>