id summary reporter owner description type status milestone component version severity resolution keywords cc 11918 access violation when using string literals with lambda style formatting expressions Stefan Mianome Andrey Semashev "The code below crashes with an access violation when using the BOOST_LOG_SEV macro. I'm using boost 1.60 compiled with msvc-10.0. {{{#!c++ #include #include #include #include #include #include #include #define BOOST_TEST_MODULE TestsLogging #include BOOST_AUTO_TEST_SUITE(example_lib_log) BOOST_AUTO_TEST_CASE(severity_logging_min) { namespace src = ::boost::log::sources; namespace keywords = ::boost::log::keywords; namespace expr = boost::log::expressions; namespace attributes = boost::log::attributes; //sink backend setup typedef boost::log::sinks::text_ostream_backend text_ostream_backend; boost::shared_ptr backend = boost::make_shared(); backend->add_stream(boost::shared_ptr(&std::cerr, boost::null_deleter())); backend->auto_flush(true); //sink frontend setup typedef boost::log::sinks::synchronous_sink synchronous_sink_text_ostream_backend; boost::shared_ptr sink(new synchronous_sink_text_ostream_backend(backend)); sink->set_formatter(expr::stream << ""["" << expr::message); //problem is here boost::log::core::get()->add_sink(sink); //logger setup typedef src::severity_logger severity_logger; severity_logger lg; //logging function BOOST_LOG_SEV(lg, boost::log::trivial::debug) << ""First entry.""; //exception happens here boost::log::core::get()->remove_sink(sink); } BOOST_AUTO_TEST_SUITE_END() }}} - When I remove the line where the formatter for the sink is set, the code works fine. - When I remove the string literal ""["" from the stream (expr::stream << expr::message), the code works fine. - When i move the string literal to the end (expr::stream << expr::message << ""["") the code also works. - The code works with boost 1.57." Bugs closed To Be Determined log Boost 1.60.0 Regression duplicate formatting