[Bug 1071315] Re: Memory leak in inflateReset2 causes follow-up problems

phil 1071315 at bugs.launchpad.net
Thu Jan 10 20:19:36 UTC 2013


This not a memory leak.  It is using uninitialized memory.
Also, it's not a bug.  See http://zlib.net/zlib_faq.html#faq36


** Changed in: zlib (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zlib in Ubuntu.
https://bugs.launchpad.net/bugs/1071315

Title:
  Memory leak in inflateReset2 causes follow-up problems

Status in “zlib” package in Ubuntu:
  Invalid

Bug description:
  There appears to be a memory leak in inflateReset2 of the library
  libz.so.1.2.3.4. The memory leak consecutively causes errors in the
  application using zlib (OpenFOAM CFD software in my case).

  This memory leak has been also identified and tracked down here:
  http://stackoverflow.com/questions/12483612/libzip-example-contains-uninitialised-values-when-checked-with-valgrind

  System is: Ubuntu 12.04.1 LTS
  zlib is: libz.so.1.2.3.4
  zlib package version is: 1:1.2.3.4.dfsg-3ubuntu4

  The output of valgrind with memcheck and track-origins in my case is:
  ==5601== Conditional jump or move depends on uninitialised value(s)
  ==5601==    at 0xC8704E0: inflateReset2 (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
  ==5601==    by 0xC8705D8: inflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
  ==5601==    by 0xC86A323: ??? (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
  ==5601==    by 0x98AAFE9: gzstreambuf::open(char const*, int) (gzstream.C:61)
  ==5601==    by 0x98AB748: gzstreambase::open(char const*, int) (gzstream.C:150)
  ==5601==    by 0x98AB435: gzstreambase::gzstreambase(char const*, int) (gzstream.C:142)
  ==5601==    by 0x98AC305: igzstream::igzstream(char const*, int) (gzstream.h:161)
  ==5601==    by 0x98ABBCA: Foam::IFstreamAllocator::IFstreamAllocator(Foam::fileName const&) (IFstream.C:65)
  ==5601==    by 0x98ABDAC: Foam::IFstream::IFstream(Foam::fileName const&, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) (IFstream.C:110)
  ==5601==    by 0x98C4FE4: Foam::IOobject::objectStream() (IOobject.C:324)
  ==5601==    by 0x98C5088: Foam::IOobject::headerOk() (IOobject.C:347)
  ==5601==    by 0x98C345B: Foam::IOdictionary::IOdictionary(Foam::IOobject const&) (IOdictionary.C:50)
  ==5601==  Uninitialised value was created by a heap allocation
  ==5601==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  ==5601==    by 0xC8705B6: inflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
  ==5601==    by 0xC86A323: ??? (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
  ==5601==    by 0x98AAFE9: gzstreambuf::open(char const*, int) (gzstream.C:61)
  ==5601==    by 0x98AB748: gzstreambase::open(char const*, int) (gzstream.C:150)
  ==5601==    by 0x98AB435: gzstreambase::gzstreambase(char const*, int) (gzstream.C:142)
  ==5601==    by 0x98AC305: igzstream::igzstream(char const*, int) (gzstream.h:161)
  ==5601==    by 0x98ABBCA: Foam::IFstreamAllocator::IFstreamAllocator(Foam::fileName const&) (IFstream.C:65)
  ==5601==    by 0x98ABDAC: Foam::IFstream::IFstream(Foam::fileName const&, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber) (IFstream.C:110)
  ==5601==    by 0x98C4FE4: Foam::IOobject::objectStream() (IOobject.C:324)
  ==5601==    by 0x98C5088: Foam::IOobject::headerOk() (IOobject.C:347)
  ==5601==    by 0x98C345B: Foam::IOdictionary::IOdictionary(Foam::IOobject const&) (IOdictionary.C:50)
  ==5601== 

  Thanks for having a look!

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/1071315/+subscriptions




More information about the foundations-bugs mailing list