Subject: [Boost-bugs] [Boost C++ Libraries] #8930: boost::path::root_directory() throws locale::facet::_S_create_c_locale name not valid
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-26 13:42:11
#8930: boost::path::root_directory() throws locale::facet::_S_create_c_locale name
not valid
-----------------------------------------+------------------------------
Reporter: Yaohan Chen <yaohan.chen@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.54.0
Severity: Problem | Keywords:
-----------------------------------------+------------------------------
On Arch Linux with boost 1.54.0, I'm getting
locale::facet::_S_create_c_locale name not valid when calling
boost::path::root_directory() while LANG is set to a locale which is
unlisted in locale -a.
boost_file_system_test.cpp:
{{{
#include <boost/filesystem.hpp>
int main() {
boost::filesystem::path("/abc").root_directory();
}
}}}
Compiling, running and backtrace:
{{{
$ g++ -std=c++0x -I/usr/include -lboost_filesystem -lboost_system -o
boost_filesystem_test boost_file_system_test.cpp
$ LANG=foo gdb boost_file_system_test
...
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Program received signal SIGABRT, Aborted.
0xb7fdd424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fdd424 in __kernel_vsyscall ()
#1 0xb7cbf256 in raise () from /usr/lib/libc.so.6
#2 0xb7cc09e3 in abort () from /usr/lib/libc.so.6
#3 0xb7eeb615 in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib/libstdc++.so.6
#4 0xb7ee9283 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb7ee92bf in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0xb7ee951e in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xb7f41842 in std::__throw_runtime_error(char const*) () from
/usr/lib/libstdc++.so.6
#8 0xb7f08138 in
std::locale::facet::_S_create_c_locale(__locale_struct*&, char const*,
__locale_struct*) () from /usr/lib/libstdc++.so.6
#9 0xb7efc759 in std::locale::_Impl::_Impl(char const*, unsigned int) ()
from /usr/lib/libstdc++.so.6
#10 0xb7efd95a in std::locale::locale(char const*) () from
/usr/lib/libstdc++.so.6
#11 0xb7f98e67 in boost::filesystem::path::codecvt() ()
from /usr/lib/libboost_filesystem.so.1.54.0
#12 0xb7f9ab4d in boost::filesystem::path::root_directory() const ()
from /usr/lib/libboost_filesystem.so.1.54.0
#13 0x08048ec7 in main ()
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8930> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC