|
From: eric e. <eri...@gm...> - 2006-02-23 12:22:46
|
Hi Klaus On 2/22/06, Klaus Spanderen <kla...@fr...> wrote: > Hi Nando > > I checked testLambdaBootstrapping using VC 8 Express, Boost 1.33.1. My > configuration does not report a memory leak;-(. Can you please send my th= e > line number of the memory leak as reported by VC 8 Professional? I don't know about VC8 Pro but valgrind detects the memory leak at line 95 of libormarketmodelprocess.cpp, the full output is below. I haven't had time to investigate further but a first guess would be that maybe the shared pointer to the LiborForwardModelProcess object is used incorrectly such that the reference counting is circumvented preventing the object from being deleted when the pointer goes out of scope. Regards, Eric =3D=3D13056=3D=3D Memcheck, a memory error detector. =3D=3D13056=3D=3D Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D13056=3D=3D Using LibVEX rev 1471, a library for dynamic binary trans= lation. =3D=3D13056=3D=3D Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. =3D=3D13056=3D=3D Using valgrind-3.1.0, a dynamic binary instrumentation fr= amework. =3D=3D13056=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D13056=3D=3D For more details, rerun with: -v =3D=3D13056=3D=3D =3D=3D13056=3D=3D My PID =3D 13056, parent PID =3D 3158. Prog and args are= : =3D=3D13056=3D=3D lt-quantlib-test-suite =3D=3D13056=3D=3D =3D=3D13056=3D=3D =3D=3D13056=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 21 f= rom 1) =3D=3D13056=3D=3D malloc/free: in use at exit: 52,152 bytes in 84 blocks. =3D=3D13056=3D=3D malloc/free: 87,206,644 allocs, 87,206,560 frees, 3,900,805,716 bytes allocated. =3D=3D13056=3D=3D For counts of detected errors, rerun with: -v =3D=3D13056=3D=3D searching for pointers to 84 not-freed blocks. =3D=3D13056=3D=3D checked 1,230,908 bytes. =3D=3D13056=3D=3D =3D=3D13056=3D=3D 1,680 bytes in 1 blocks are possibly lost in loss record = 15 of 28 =3D=3D13056=3D=3D at 0x43CA7F8: operator new(unsigned) (vg_replace_mallo= c.c:164) =3D=3D13056=3D=3D by 0x8A7A7A: std::__default_alloc_template<true, 0>::_S_chunk_alloc(unsigned, int&) (in /usr/lib/libstdc++.so.5.0.7) =3D=3D13056=3D=3D by 0x8A798C: std::__default_alloc_template<true, 0>::_S_refill(unsigned) (in /usr/lib/libstdc++.so.5.0.7) =3D=3D13056=3D=3D by 0x8A7687: std::__default_alloc_template<true, 0>::allocate(unsigned) (in /usr/lib/libstdc++.so.5.0.7) =3D=3D13056=3D=3D by 0x8AD017: std::string::_Rep::_S_create(unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.5.0.7) =3D=3D13056=3D=3D by 0x4415094: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x44154C4: boost::unit_test_framework::retrieve_framework_parameter(char const*, int*, char**) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441CC26: main (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D =3D=3D13056=3D=3D =3D=3D13056=3D=3D 2,192 (224 direct, 1,968 indirect) bytes in 2 blocks are definitely lost in loss record 16 of 28 =3D=3D13056=3D=3D at 0x43CA7F8: operator new(unsigned) (vg_replace_mallo= c.c:164) =3D=3D13056=3D=3D by 0x821683D: (anonymous namespace)::makeProcess(QuantLib::Matrix const&) (libormarketmodelprocess.cpp:95) =3D=3D13056=3D=3D by 0x8217F33: LiborMarketModelProcessTest::testMonteCarloCapletPricing() (libormarketmodelprocess.cpp:226) =3D=3D13056=3D=3D by 0x80B7F35: boost::unit_test_framework::function_test_case::do_run() (unit_test_suite.hpp:138) =3D=3D13056=3D=3D by 0x441748C: boost::unit_test_framework::detail::unit_test_monitor::function() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x44115EA: (within /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x440FF30: boost::execution_monitor::execute(bool, int) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x4417317: boost::unit_test_framework::detail::unit_test_monitor::execute_and_translat= e(boost::unit_test_framework::test_case*, void (boost::unit_test_framework::test_case::*)(), int) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441B8FB: boost::unit_test_framework::test_case::run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441C0B4: boost::unit_test_framework::test_suite::do_run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441BA90: boost::unit_test_framework::test_case::run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441C0B4: boost::unit_test_framework::test_suite::do_run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D =3D=3D13056=3D=3D =3D=3D13056=3D=3D 1,240 (44 direct, 1,196 indirect) bytes in 1 blocks are definitely lost in loss record 18 of 28 =3D=3D13056=3D=3D at 0x43CA7F8: operator new(unsigned) (vg_replace_mallo= c.c:164) =3D=3D13056=3D=3D by 0x82121BF: boost::detail::shared_count::shared_count<QuantLib::LiborForwardModelProces= s*, boost::checked_deleter<QuantLib::LiborForwardModelProcess> >(QuantLib::LiborForwardModelProcess*, boost::checked_deleter<QuantLib::LiborForwardModelProcess>) (shared_count.hpp:341) =3D=3D13056=3D=3D by 0x8210C1C: boost::shared_ptr<QuantLib::LiborForwardModelProcess>::shared_ptr<QuantLib:= :LiborForwardModelProcess>(QuantLib::LiborForwardModelProcess*) (shared_ptr.hpp:126) =3D=3D13056=3D=3D by 0x8216884: (anonymous namespace)::makeProcess(QuantLib::Matrix const&) (libormarketmodelprocess.cpp:95) =3D=3D13056=3D=3D by 0x8217F80: LiborMarketModelProcessTest::testMonteCarloCapletPricing() (libormarketmodelprocess.cpp:228) =3D=3D13056=3D=3D by 0x80B7F35: boost::unit_test_framework::function_test_case::do_run() (unit_test_suite.hpp:138) =3D=3D13056=3D=3D by 0x441748C: boost::unit_test_framework::detail::unit_test_monitor::function() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x44115EA: (within /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x440FF30: boost::execution_monitor::execute(bool, int) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x4417317: boost::unit_test_framework::detail::unit_test_monitor::execute_and_translat= e(boost::unit_test_framework::test_case*, void (boost::unit_test_framework::test_case::*)(), int) (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441B8FB: boost::unit_test_framework::test_case::run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D by 0x441C0B4: boost::unit_test_framework::test_suite::do_run() (in /usr/local/lib/libboost_unit_test_framework-gcc-1_31.so.1.31.0) =3D=3D13056=3D=3D =3D=3D13056=3D=3D LEAK SUMMARY: =3D=3D13056=3D=3D definitely lost: 268 bytes in 3 blocks. =3D=3D13056=3D=3D indirectly lost: 3,164 bytes in 24 blocks. =3D=3D13056=3D=3D possibly lost: 1,680 bytes in 1 blocks. =3D=3D13056=3D=3D still reachable: 47,040 bytes in 56 blocks. =3D=3D13056=3D=3D suppressed: 0 bytes in 0 blocks. =3D=3D13056=3D=3D Reachable blocks (those to which a pointer was found) are= not shown. =3D=3D13056=3D=3D To see them, rerun with: --show-reachable=3Dyes |