Re: [Boost-bugs] [Boost C++ Libraries] #7379: Boost Format strings causing memory leaks

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7379: Boost Format strings causing memory leaks
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-12 15:17:42


#7379: Boost Format strings causing memory leaks
----------------------------------------------+----------------------------
  Reporter: Jason Vincent <jason.vincent@…> | Owner: James E. King,
                                              | III
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: format
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords: format memory
                                              | leak
----------------------------------------------+----------------------------
Changes (by James E. King, III):

 * owner: Samuel Krempp => James E. King, III
 * status: new => assigned

Comment:

 I am unable to reproduce this issue using valgrind by adding the following
 test to format_test_wstring.cpp:
 {{{
 diff --git a/test/format_test_wstring.cpp b/test/format_test_wstring.cpp
 index c30f740..4f9a871 100644
 --- a/test/format_test_wstring.cpp
 +++ b/test/format_test_wstring.cpp
 @@ -29,8 +29,16 @@ int test_main(int, char* [])
        BOOST_ERROR("Basic w-parsing Failed");
    if(str( wformat(L"%%##%#x ##%%1 %s00") % 20 % L"Escaped OK" ) !=
 L"%##0x14 ##%1 Escaped OK00")
        BOOST_ERROR("Basic wp-parsing Failed") ;
 -#endif // wformat tests

 + // testcase for https://svn.boost.org/trac10/ticket/7379 (for valgrind)
 + wformat wfmt(L"%1$.1f");
 + std::wstring ws = str(wfmt % 123.45f);
 + BOOST_CHECK_EQUAL(ws.compare(L"123.4"), 0);
 + wformat wfmt2(L"%1$.0f %%");
 + std::wstring ws2 = (wfmt2 % 123.45f).str();
 + BOOST_CHECK_EQUAL(ws2.compare(L"123 %"), 0);
 +
 +#endif // wformat tests

    return 0;
  }
 }}}

 The method in which memory leak detection was determined is missing from
 the original bug report.After building debug and then running valgrind on
 it, there were no leaks. As such I am resolving this as "worksforme".

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/7379#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-10-12 15:23:52 UTC