Subject: [Boost-bugs] [Boost C++ Libraries] #9634: v 1.54 - powerpc64/LE : filesystem : operations_test : core
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-06 13:13:02
#9634: v 1.54 - powerpc64/LE : filesystem : operations_test : core
-------------------------------------+------------------------
Reporter: Tony Reix <tony.reix@â¦> | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
-------------------------------------+------------------------
Hi,
Test
/boost1.54-1.54.0/bin.v2/libs/filesystem/test/operations_test_static.test/gcc-4.8/debug
/link-static/operations_test generates a core, when testing it with
version 1.54 on powerpc64/LE - Ubuntu 14.04 alpha2.
Defect has already been opened against Ubuntu, since they do not seem to
have lunch Boost tests in this environment: no answer yet.
Debugging seems to show that the issue is in:
BOOST : libs/filesystem/src/path.cpp
std::locale path::imbue(const std::locale& loc)
{
std::locale temp(path_locale); <<<<<<<<<<<<<<<<<<<<<<< line 918
path_locale = loc;
codecvt_facet_ptr =
&std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t>
>(path_locale);
return temp;
}
At line 918, C++ tries to do some initialization. This seems to imply to
use field _M_impl of path_locale, which is 0x0.
It seems that no initialization of path_locale is done and thus _M_impl
stay 0x0. Then, there is a crash in stdlibc++ code.
(gdb) where
#0 boost::filesystem::path::imbue (loc=...) at
../libs/filesystem/src/path.cpp:918
#1 0x00000000100491b0 in boost::filesystem::path::codecvt () at
../libs/filesystem/src/path.cpp:911
#2 0x000000001004aa3c in boost::filesystem::path::wstring
(this=0x3ffffffff5c8) at ../boost/filesystem/path.hpp:386
#3 0x000000001004a540 in boost::filesystem::detail::unique_path
(model=..., ec=0x0) at ../libs/filesystem/src/unique_path.cpp:113
#4 0x00000000100238c4 in boost::filesystem::unique_path (p=...) at
../boost/filesystem/operations.hpp:544
#5 0x00000000100200cc in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535) at
../libs/filesystem/test/operations_test.cpp:118
#6 0x00000000100201fc in _GLOBAL__sub_I__Z8cpp_mainiPPc () at
../libs/filesystem/test/operations_test.cpp:2034
#7 0x000000001004d444 in __libc_csu_init ()
#8 0x00003fffb7c8e1ec in generic_start_main (main=0x1003173c <main(int,
char**)>, argc=<optimized out>, argv=0x3ffffffffa68,
auxvec=0x3ffffffffb10, init=0x1004d3b0 <__libc_csu_init>,
rtld_fini=<optimized out>, stack_end=<optimized out>, fini=<optimized
out>) at ../csu/libc-start.c:246
#9 0x00003fffb7c8e458 in __libc_start_main (argc=<optimized out>,
argv=<optimized out>, ev=<optimized out>, auxvec=<optimized out>,
rtld_fini=<optimized out>, stinfo=<optimized out>,
stack_on_entry=<optimized out>) at ../sysdeps/unix/sysv/linux/powerpc
/libc-start.c:93
#10 0x0000000000000000 in ?? ()
(gdb) p loc
$25 = (const std::locale &) @0x3ffffffff418: {static none = 0, static
ctype = 1, static numeric = 2, static collate = 4, static time = 8, static
monetary = 16, static messages = 32, static all = 63,
_M_impl = 0x100790f0, static _S_classic = 0x3fffb7fae0b8 <(anonymous
namespace)::c_locale_impl>, static _S_global = 0x3fffb7fae0b8 <(anonymous
namespace)::c_locale_impl>,
static _S_categories = 0x3fffb7f92cb8 <__gnu_cxx::category_names>,
static _S_once = 0}
(gdb) p path_locale
$26 = {static none = 0, static ctype = 1, static numeric = 2, static
collate = 4, static time = 8, static monetary = 16, static messages = 32,
static all = 63,
M_impl = 0x0,
static _S_classic = 0x3fffb7fae0b8 <(anonymous
namespace)::c_locale_impl>, static _S_global = 0x3fffb7fae0b8 <(anonymous
namespace)::c_locale_impl>,
static _S_categories = 0x3fffb7f92cb8 <__gnu_cxx::category_names>,
static _S_once = 0}
So, the question is: why path_locale has not been initialized ? and why
this happens in PPC/LE and not elsewhere ?
I'm not an expert in C++ and need help.
Thanks/Regards
Tony
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9634> 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:15 UTC