id summary reporter owner description type status milestone component version severity resolution keywords cc 12475 boost::fast_pool_allocator causes a deadlock on Windows 7 dictoon@… Chris Newbold "When invoked from a DLL, Boost.Wave's C++ lexer causes the application to hang on Windows 7 (and only on Windows 7) and to crash when interrupted with CTRL+C on other Windows versions. Here is a minimal test program in two parts, a DLL and an EXE, that reproduces the problem: ==== DLL {{{#!cpp #include #include #include __declspec(dllexport) void foo() { typedef boost::wave::cpplexer::lex_token<> token_type; typedef boost::wave::cpplexer::lex_iterator lex_iterator_type; typedef boost::wave::context context_type; std::string s = ""\n""; context_type ctx(s.begin(), s.end()); auto first = *ctx.begin(); } }}} ==== EXE {{{#!cpp #include __declspec(dllimport) void foo(); int main() { foo(); fprintf(stderr, ""Press CTRL+C to terminate...\n""); while (true) {} return 0; } }}} On Windows 7, this program will hang at startup, before entering {{{main()}}}. On other versions of Windows, the program will start and print the message, but pressing CTRL+C to terminate it will cause a crash. ---- A deeper investigation reveals that the problem is actually caused by Boost's {{{fast_pool_allocator}}}. Here is another minimal example that triggers the same bug as the program above: ==== DLL {{{#!cpp #include #include typedef std::list< int, boost::fast_pool_allocator > container; static container last; __declspec(dllexport) void foo() {} }}} ==== EXE //Same as in the previous program.// The symptoms of this program should be exactly the same as those of the previous one." Bugs new To Be Determined pool Boost 1.61.0 Showstopper