Boost C++ Libraries: Ticket #11958: boost::gregorian is not thread safe https://svn.boost.org/trac10/ticket/11958 <p> in greg_month.cpp, </p> <p> The static method get_month_map_ptr performs a non-thread-safe initialization of the month_map structure on the first access. </p> <p> If the first access is done concurrently, it is likely to crash with a segmentation fault as such: </p> <p> Program received signal SIGSEGV, Segmentation fault. <a class="missing ticket">#0</a> 0x00007fffef9127d9 in std::_Rb_tree&lt;std::string, std::pair&lt;std::string const, unsigned short&gt;, std::_Select1st&lt;std::pair&lt;std::string const, unsigned short&gt; &gt;, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, unsigned short&gt; &gt; &gt;::_M_insert_unique(std::pair&lt;std::string const, unsigned short&gt; const&amp;) () </p> <blockquote> <p> from /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.54.0 </p> </blockquote> <p> <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> 0x00007fffef90fc90 in boost::gregorian::greg_month::get_month_map_ptr() () from /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.54.0 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2" title="#2: Bugs: list::size should be const (closed: fixed)">#2</a> 0x00007ffff4d41e07 in boost::date_time::month_str_to_ushort&lt;boost::gregorian::greg_month&gt; (s=...) at /usr/include/boost/date_time/date_parsing.hpp:67 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3" title="#3: Bugs: automatic conversion and overload proble (closed: fixed)">#3</a> 0x00007ffff4d4341a in boost::date_time::parse_date&lt;boost::gregorian::date&gt; (s=..., order_spec=order_spec@entry=0) at /usr/include/boost/date_time/date_parsing.hpp:143 <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> 0x00007ffff4d3a720 in from_string (s=...) at /usr/include/boost/date_time/gregorian/parsers.hpp:30 </p> <p> I suggest initializing the map in a safe, lockless manner. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11958 Trac 1.4.3 anonymous Tue, 15 Mar 2016 17:49:25 GMT <link>https://svn.boost.org/trac10/ticket/11958#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11958#comment:1</guid> <description> <p> I encountered this issue in 1.57.0 </p> </description> <category>Ticket</category> </item> <item> <author>royce@…</author> <pubDate>Tue, 15 Mar 2016 17:58:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11958#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11958#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/11958#comment:1" title="Comment 1">anonymous</a>: </p> <blockquote class="citation"> <p> I encountered this issue in 1.57.0 </p> </blockquote> <p> Adding email to be notified when fixed. </p> </description> <category>Ticket</category> </item> </channel> </rss>