Opened 9 years ago

#9634 new Bugs

v 1.54 - powerpc64/LE : filesystem : operations_test : core

Reported by: Tony Reix <tony.reix@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

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 _GLOBALsub_IZ8cpp_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

Attachments (1)

A (2.3 KB ) - added by Tony Reix <tony.reix@…> 9 years ago.
gdb traces

Download all attachments as: .zip

Change History (1)

by Tony Reix <tony.reix@…>, 9 years ago

Attachment: A added

gdb traces

Note: See TracTickets for help on using tickets.