[Boost-bugs] [ boost-Bugs-1509978 ] crash in boost::spirit::parse

Bugs item #1509978, was opened at 2006-06-21 06:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1509978&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: crash in boost::spirit::parse Initial Comment: When using boost::spirit::parse() in a multithreaded environment with #define BOOST_SPIRIT_THREADSAFE set the call to get_definition() in grammar.ipp can crash. Here is the according code of grammar.ipp: <snip> # ifdef BOOST_SPIRIT_THREADSAFE // Line 224 static boost::thread_specific_ptr<ptr_t> tld_helper; if (!tld_helper.get()) tld_helper.reset(new ptr_t); ptr_t &helper = *tld_helper; # else </snip> When thread 1 enters Line 224 the static tld_helper will be initialized by running the constructor. If now thread 2 enters this code before thread 1 has finished the contructor of tld_helper thread 2 will call the get() method on the uninitialized tld_helper what leads to an access violation in tss.cpp Line 108 due a nullpointer in tss_data. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1509978&group_id=7586 _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net