Boost C++ Libraries: Ticket #9634: v 1.54 - powerpc64/LE : filesystem : operations_test : core https://svn.boost.org/trac10/ticket/9634 <p> 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: </p> <p> BOOST : libs/filesystem/src/path.cpp </p> <blockquote> <p> std::locale path::imbue(const std::locale&amp; loc) { </p> <blockquote> <p> std::locale temp(path_locale); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; line 918 path_locale = loc; codecvt_facet_ptr = </p> <blockquote> <p> &amp;std::use_facet&lt;std::codecvt&lt;wchar_t, char, std::mbstate_t&gt; &gt;(path_locale); </p> </blockquote> <p> return temp; </p> </blockquote> <p> } </p> </blockquote> <p> 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. </p> <p> (gdb) where <a class="missing ticket">#0</a> boost::filesystem::path::imbue (loc=...) at ../libs/filesystem/src/path.cpp:918 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1" title="#1: Bugs: boost.build causes ftjam to segfault (closed: Wont Fix)">#1</a> 0x00000000100491b0 in boost::filesystem::path::codecvt () at ../libs/filesystem/src/path.cpp:911 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2" title="#2: Bugs: list::size should be const (closed: fixed)">#2</a> 0x000000001004aa3c in boost::filesystem::path::wstring (this=0x3ffffffff5c8) at ../boost/filesystem/path.hpp:386 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3" title="#3: Bugs: automatic conversion and overload proble (closed: fixed)">#3</a> 0x000000001004a540 in boost::filesystem::detail::unique_path (model=..., ec=0x0) at ../libs/filesystem/src/unique_path.cpp:113 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4" title="#4: Bugs: any_ptr in any library documentation? (closed: Fixed)">#4</a> 0x00000000100238c4 in boost::filesystem::unique_path (p=...) at ../boost/filesystem/operations.hpp:544 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5" title="#5: Bugs: shared_ptr and self-owning objects (closed: Fixed)">#5</a> 0x00000000100200cc in <span class="underline">static_initialization_and_destruction_0 (</span>initialize_p=1, <span class="underline">priority=65535) at ../libs/filesystem/test/operations_test.cpp:118 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6" title="#6: Bugs: tie in utility.hpp and tuple.hpp clash. (closed: Duplicate)">#6</a> 0x00000000100201fc in _GLOBAL</span>sub_I<span class="underline">Z8cpp_mainiPPc () at ../libs/filesystem/test/operations_test.cpp:2034 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7" title="#7: Bugs: g++ 2.96 requires NO_STRINGSTREAM (closed: Fixed)">#7</a> 0x000000001004d444 in </span>libc_csu_init () <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8" title="#8: Bugs: prop in undirected graph + out_edges (closed: Works For Me)">#8</a> 0x00003fffb7c8e1ec in generic_start_main (main=0x1003173c &lt;main(int, char<strong>)&gt;, argc=&lt;optimized out&gt;, argv=0x3ffffffffa68, auxvec=0x3ffffffffb10, init=0x1004d3b0 &lt;<span class="underline">libc_csu_init&gt;, </span></strong></p> <blockquote> <p> rtld_fini=&lt;optimized out&gt;, stack_end=&lt;optimized out&gt;, fini=&lt;optimized out&gt;) at ../csu/libc-start.c:246 </p> </blockquote> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9" title="#9: Bugs: config_info ambiguity error (closed: Invalid)">#9</a> 0x00003fffb7c8e458 in <span class="underline">libc_start_main (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;, ev=&lt;optimized out&gt;, auxvec=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stinfo=&lt;optimized out&gt;, </span></p> <blockquote> <p> stack_on_entry=&lt;optimized out&gt;) at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:93 </p> </blockquote> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10" title="#10: Bugs: allyourbase.jam file is bad. (closed: Out of Date)">#10</a> 0x0000000000000000 in ?? () </p> <p> (gdb) p loc $25 = (const std::locale &amp;) @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, </p> <blockquote> <p> _M_impl = 0x100790f0, static _S_classic = 0x3fffb7fae0b8 &lt;(anonymous namespace)::c_locale_impl&gt;, static _S_global = 0x3fffb7fae0b8 &lt;(anonymous namespace)::c_locale_impl&gt;, static _S_categories = 0x3fffb7f92cb8 &lt;<span class="underline">gnu_cxx::category_names&gt;, static _S_once = 0} </span></p> </blockquote> <p> (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, </p> <blockquote> <p> M_impl = 0x0, </p> </blockquote> <blockquote> <p> static _S_classic = 0x3fffb7fae0b8 &lt;(anonymous namespace)::c_locale_impl&gt;, static _S_global = 0x3fffb7fae0b8 &lt;(anonymous namespace)::c_locale_impl&gt;, static _S_categories = 0x3fffb7f92cb8 &lt;<span class="underline">gnu_cxx::category_names&gt;, static _S_once = 0} </span></p> </blockquote> <p> So, the question is: why path_locale has not been initialized ? and why this happens in PPC/LE and not elsewhere ? </p> <p> I'm not an expert in C++ and need help. </p> <p> <a class="missing wiki">Thanks/Regards</a> </p> <p> Tony </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9634 Trac 1.4.3 Tony Reix <tony.reix@…> Thu, 06 Feb 2014 13:14:55 GMT attachment set https://svn.boost.org/trac10/ticket/9634 https://svn.boost.org/trac10/ticket/9634 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">A</span> </li> </ul> <p> gdb traces </p> Ticket