Boost C++ Libraries: Ticket #9560: operations_test_static unit test crashes during static initialization phase on Mac/10.7/32-bit/darwin-4.2.1
https://svn.boost.org/trac10/ticket/9560
<p>
Verifying a 32-bit build of Boost on Mac, I get a consistent crash in operations_test_static during static initialization (prior to main() invocation). Problem appears to be a lack of initialization of path.hpp's anon namespace 'codecvt_facet_ptr'.
</p>
<p>
Platform: 1.55.0, Mac OS 10.7, Xcode 4.3.3, darwin-4.2.1,
address-model=32, architecture=x86
</p>
<p>
Build sequence is (approximately):
</p>
<pre class="wiki">./bjam toolset=darwin variant=debug address-model=32 architecture=x86 --layout=tagged --with-filesystem -sNO_BZIP2=1 -d2 -d+4 stage
cd libs/filesystem/test
../../../bjam toolset=darwin variant=debug address-model=32 architecture=x86 --layout=tagged --with-filesystem -sNO_BZIP2=1 -d2 -d+4 -a -q
</pre><p>
Stacktrace of access violation:
</p>
<pre class="wiki">(gdb) run
Starting program: /Users/monty/3P/3p-boost-update/boost/bin.v2/libs/filesystem/test/operations_test_static.test/darwin-4.2.1/debug/address-model-32/architecture-x86/link-static/operations_test_static
Reading symbols for shared libraries ++......................... done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00058054 in std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>::in (this=0x0, __state=@0xbfffeba0,
__from=0x1660cc "operations-test-%%%%-%%%%-%%%%-%%%%", __from_end=0x1660ef "", __from_next=@0xbfffeb9c,
__to=0xbfffec90, __to_end=0xbffff090, __to_next=@0xbfffeb98) at codecvt.h:206
206 __to, __to_end, __to_next);
(gdb) where
#0 0x00058054 in std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>::in (this=0x0, __state=@0xbfffeba0,
__from=0x1660cc "operations-test-%%%%-%%%%-%%%%-%%%%", __from_end=0x1660ef "", __from_next=@0xbfffeb9c,
__to=0xbfffec90, __to_end=0xbffff090, __to_next=@0xbfffeb98) at codecvt.h:206
#1 0x00057e10 in convert_aux (from=0x1660cc "operations-test-%%%%-%%%%-%%%%-%%%%", from_end=0x1660ef "",
to=0xbfffec90, to_end=0xbffff090, target=@0xbffff200, cvt=@0x0) at path_traits.cpp:76
#2 0x00057908 in boost::filesystem::path_traits::convert (from=0x1660cc "operations-test-%%%%-%%%%-%%%%-%%%%",
from_end=0x1660ef "", to=@0xbffff200, cvt=@0x0) at path_traits.cpp:158
#3 0x00058c79 in boost::filesystem::path::wstring (this=0xbffff288, cvt=@0x0) at path.hpp:392
#4 0x00058d0a in boost::filesystem::path::wstring (this=0xbffff288) at path.hpp:386
#5 0x00058346 in boost::filesystem::detail::unique_path (model=@0xbffff288, ec=0x0) at unique_path.cpp:113
#6 0x000375fb in boost::filesystem::unique_path (p=@0xbffff288) at operations.hpp:544
#7 0x000339b5 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at operations_test.cpp:118
#8 0x0003371a in global constructors keyed to _ZN12_GLOBAL__N_18platformE () at operations_test.cpp:2035
#9 0x8fe11203 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#10 0x8fe10d68 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#11 0x8fe0e2c8 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#12 0x8fe0f268 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#13 0x8fe03694 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#14 0x8fe07f99 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_ ()
#15 0x8fe012ef in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_ ()
#16 0x8fe01063 in __dyld__dyld_start ()
</pre>
en-us
Boost C++ Libraries
/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/9560
Trac 1.4.3
-
chris.cooper@…
Wed, 16 Apr 2014 15:19:38 GMT
<link>https://svn.boost.org/trac10/ticket/9560#comment:1 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9560#comment:1</guid>
<description>
<p>
Similar problem with the clang++ compiler shipped with XCode 5.1 ("Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)").
</p>
<p>
Stack trace:
</p>
<ul><li>thread <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>: tid = 0x430e0, 0x000000010002a609 operations_test_static`(anonymous namespace)::convert_aux(char const*, char const*, wchar_t*, wchar_t*, std::<span class="underline">1::basic_string<wchar_t, std::</span>1::char_traits<wchar_t>, std::<span class="underline">1::allocator<wchar_t> >&, std::</span>1::codecvt<wchar_t, char, <span class="underline">mbstate_t> const&) + 89, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
</span><ul><li>frame <a class="missing ticket">#0</a>: 0x000000010002a609 operations_test_static`(anonymous namespace)::convert_aux(char const*, char const*, wchar_t*, wchar_t*, std::<span class="underline">1::basic_string<wchar_t, std::</span>1::char_traits<wchar_t>, std::<span class="underline">1::allocator<wchar_t> >&, std::</span>1::codecvt<wchar_t, char, <span class="underline">mbstate_t> const&) + 89
frame <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>: 0x000000010002a56f operations_test_static`boost::filesystem::path_traits::convert(char const*, char const*, std::</span>1::basic_string<wchar_t, std::<span class="underline">1::char_traits<wchar_t>, std::</span>1::allocator<wchar_t> >&, std::<span class="underline">1::codecvt<wchar_t, char, </span>mbstate_t> const&) + 207
frame <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2" title="#2: Bugs: list::size should be const (closed: fixed)">#2</a>: 0x000000010002ac47 operations_test_static`boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*) + 135
frame <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3" title="#3: Bugs: automatic conversion and overload proble (closed: fixed)">#3</a>: 0x0000000100021028 operations_test_static`_GLOBAL<span class="underline">I_a + 504
</span></li></ul></li></ul>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>anonymous</dc:creator>
<pubDate>Wed, 16 Apr 2014 15:20:49 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/9560#comment:2 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9560#comment:2</guid>
<description>
<p>
Sorry, didn't notice the formatting.
</p>
<pre class="wiki">* thread #1: tid = 0x430e0, 0x000000010002a609 operations_test_static`(anonymous namespace)::convert_aux(char const*, char const*, wchar_t*, wchar_t*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&, std::__1::codecvt<wchar_t, char, __mbstate_t> const&) + 89, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x000000010002a609 operations_test_static`(anonymous namespace)::convert_aux(char const*, char const*, wchar_t*, wchar_t*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&, std::__1::codecvt<wchar_t, char, __mbstate_t> const&) + 89
frame #1: 0x000000010002a56f operations_test_static`boost::filesystem::path_traits::convert(char const*, char const*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&, std::__1::codecvt<wchar_t, char, __mbstate_t> const&) + 207
frame #2: 0x000000010002ac47 operations_test_static`boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*) + 135
frame #3: 0x0000000100021028 operations_test_static`_GLOBAL__I_a + 504
</pre>
</description>
<category>Ticket</category>
</item>
</channel>
</rss>