Bugzilla – Bug 431
wifi wired-bridging.cc memory leak reported in valgrind
Last modified: 2008-12-03 20:52:33 EST
Optimized build on ns-regression Linux version 2.6.24-19-server (buildd@king) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 18:43:06 UTC 2008 [ns-regression] ~/repos/ns-3.3-RC1 > gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with -system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/in clude/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checki ng=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) ==26559== Memcheck, a memory error detector. ==26559== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==26559== Using LibVEX rev 1804, a library for dynamic binary translation. ==26559== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==26559== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework. ==26559== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==26559== For more details, rerun with: -v ==26559== ==26559== ==26559== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 8 from 1) ==26559== malloc/free: in use at exit: 50,402 bytes in 338 blocks. ==26559== malloc/free: 41,134 allocs, 40,796 frees, 2,650,456 bytes allocated. ==26559== For counts of detected errors, rerun with: -v ==26559== searching for pointers to 338 not-freed blocks. ==26559== checked 748,104 bytes. ==26559== ==26559== 49,266 (104 direct, 49,162 indirect) bytes in 1 blocks are definitely lost in loss record 19 of 78 ==26559== at 0x4C23809: operator new(unsigned long) (vg_replace_malloc.c:230) ==26559== by 0x5141272: ns3::Ptr<ns3::Node> ns3::CreateObject<ns3::Node>(ns3::AttributeList const&) (object.h:398) ==26559== by 0x5142B59: ns3::Ptr<ns3::Node> ns3::CreateObject<ns3::Node>(std::string, ns3::AttributeValue const&, std::string , ns3::AttributeValue const&, std::string, ns3::AttributeValue const&, std::string, ns3::AttributeValue const&, std::string, ns3 ::AttributeValue const&, std::string, ns3::AttributeValue const&, std::string, ns3::AttributeValue const&, std::string, ns3::Att ributeValue const&, std::string, ns3::AttributeValue const&) (object.h:463) ==26559== by 0x525B278: ns3::NodeContainer::Create(unsigned) (node-container.cc:90) ==26559== by 0x404CCF: main (wifi-wired-bridging.cc:87) ==26559== ==26559== LEAK SUMMARY: ==26559== definitely lost: 104 bytes in 1 blocks. ==26559== indirectly lost: 49,162 bytes in 335 blocks. ==26559== possibly lost: 0 bytes in 0 blocks. ==26559== still reachable: 1,136 bytes in 2 blocks. ==26559== suppressed: 0 bytes in 0 blocks. ==26559== Reachable blocks (those to which a pointer was found) are not shown. ==26559== To see them, rerun with: --leak-check=full --show-reachable=yes PASS test-wifi-wired-bridging
Also fails in debug build
Bridge device was not releasing references to bridge ports. Fix ready. Will commit as soon as Raj is done with ns-3-dev.