Boost C++ Libraries: Ticket #2436: [spirit2] segfault upon grammar instantiation https://svn.boost.org/trac10/ticket/2436 <p> I recently switched from g++ 4.0 to g++ 4.2 and now get this warning. I am using the 1.37 beta. </p> <pre class="wiki">***/boost-1_37/boost/spirit/home/support/nonterminal/detail/nonterminal_fcall.hpp:53: warning: missing braces around initializer for 'boost::spirit::parameterized_nonterminal&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, void ()(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;), vast::bro::bro_white_space&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt;, boost::fusion::vector&lt;boost::phoenix::actor&lt;boost::spirit::local_var&lt;0&gt; &gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt;' </pre><p> Later on, my application segfaults. Here is the stack trace: </p> <pre class="wiki">Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x00000000 0x8fe18b42 in __dyld_misaligned_stack_error () (gdb) bt #0 0x8fe18b42 in __dyld_misaligned_stack_error () #1 0xbfffdf98 in ?? () #2 0x036f2993 in std::_Rb_tree_insert_and_rebalance () #3 0x00109c5b in std::_Rb_tree&lt;std::string, std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt;, std::_Select1st&lt;std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt; &gt;, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt; &gt; &gt;::_M_insert (this=0xbfffdf34, __x=0x0, __p=0x3802b30, __v=@0xbfffdf94) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #4 0x00109e10 in std::_Rb_tree&lt;std::string, std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt;, std::_Select1st&lt;std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt; &gt;, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt; &gt; &gt;::_M_insert_unique (this=0xbfffdf34, __v=@0xbfffdf94) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #5 0x00109e88 in std::map&lt;std::string, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt;, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, boost::variant&lt;vast::meta::vm_addr_t, vast::meta::vm_any_t, vast::meta::vm_bool_t, vast::meta::vm_count_t, vast::meta::vm_double_t, vast::meta::vm_interval_t, vast::meta::vm_int_t, vast::meta::vm_file_t, vast::meta::vm_port_t, vast::meta::vm_string_t, vast::meta::vm_subnet_t, vast::meta::vm_time_t, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_&gt; &gt; &gt; &gt;::insert (this=0xbfffdf34, __x=@0xbfffdf94) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #6 0x0012633a in vast::meta::vast_basic_type::vast_basic_type (this=&lt;incomplete type&gt;) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #7 0x00126e75 in vast::meta::vast_type&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt; &gt;::vast_type (this=&lt;incomplete type&gt;, sym_type=&lt;incomplete type&gt;) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #8 0x0012849c in vast::meta::vast_grammar&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt; &gt;::vast_grammar (this=0xbfffe73c, events=@0xbfffe928) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/spirit/home/qi/nonterminal/detail/rule.hpp:116 #9 0x00145def in vast::meta::Specification::load (this=&lt;incomplete type&gt;, filename=&lt;incomplete type&gt;) at /opt/local/include/gcc42/c++/bits/stl_algobase.h:401 #10 0x0005d4eb in main (argc=&lt;incomplete type&gt;, argv=&lt;incomplete type&gt;) at /Users/mavam/code/workspace/vast/build/root/include/boost-1_37/boost/thread/detail/thread.hpp:543 </pre><p> Let me know if you need more context from my application, I am not sure where to start from here. </p> <p> Best regards, </p> <p> Matthias </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2436 Trac 1.4.3 anonymous Tue, 02 Jun 2009 01:15:16 GMT <link>https://svn.boost.org/trac10/ticket/2436#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2436#comment:1</guid> <description> <p> Is this still a problem? If yes, could you please provide a minimal example reproducing this problem? Otherwise it's not possible to fix it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Fri, 10 Jul 2009 00:38:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2436#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2436#comment:2</guid> <description> <p> Yes, please post a minimal example reproducing this. There's no other way for me to tell. </p> </description> <category>Ticket</category> </item> <item> <author>vallentin@…</author> <pubDate>Fri, 10 Jul 2009 00:50:50 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2436#comment:3 https://svn.boost.org/trac10/ticket/2436#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2436#comment:2" title="Comment 2">djowel</a>: </p> <blockquote class="citation"> <p> Yes, please post a minimal example reproducing this. There's no other way for me to tell. </p> </blockquote> <p> It's actually solved, I am using gcc 4.3 for a while now and the problem doesn't exist anymore. </p> Ticket