Boost C++ Libraries: Ticket #5036: Boost.Test VC memory leak report should direct to stderr https://svn.boost.org/trac10/ticket/5036 <p> Boost.Test includes a memory leak detection feature (uses the ones MSV provided). Unfortunately it redirects the output to stdout, not conventional stderr. </p> <p> We are currently creating XML-based test reports. If the memory leak happended, the XML becomes ill-formed. For better interoperability, the debug output should go to stderr. </p> <p> I traced the place where the called in placed (in boost/test/impl/debug.ipp) </p> <pre class="wiki">#ifdef BOOST_MS_CRT_BASED_DEBUG int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ); if( !on_off ) flags &amp;= ~_CRTDBG_LEAK_CHECK_DF; else { flags |= _CRTDBG_LEAK_CHECK_DF; _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); } _CrtSetDbgFlag ( flags ); #endif // BOOST_MS_CRT_BASED_DEBUG </pre><p> The call _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); should be changed to </p> <blockquote> <p> _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5036 Trac 1.4.3 Gennadiy Rozental Tue, 18 Oct 2011 09:46:27 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5036#comment:1 https://svn.boost.org/trac10/ticket/5036#comment:1 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75038" title="use stderr as default stream for reporting leak errors (the same as ...">[75038]</a>) use stderr as default stream for reporting leak errors (the same as any other reports) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5036" title="#5036: Bugs: Boost.Test VC memory leak report should direct to stderr (closed: fixed)">#5036</a> </p> Ticket Raffi Enficiaud Tue, 07 Jul 2015 08:20:02 GMT milestone changed https://svn.boost.org/trac10/ticket/5036#comment:2 https://svn.boost.org/trac10/ticket/5036#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> Ticket