[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#318317: libc6: Numerous (49) memory leaks in gethostbyname, as reported by mudflap



Package: libc6
Version: 2.3.2.ds1-22
Severity: normal


How to reproduce:
Create a file main.cpp / main.c with the following contents:

#include <netdb.h>
int main()
{
	gethostbyname("www.google.com");
	return 0;
}

Then execute the following:

g++-4.0 -fmudflap (the filename you created above) -lmudflap

That will of course create an executable named a.out in the current directory.

Before running, execute the following:

export MUDFLAP_OPTIONS='-internal-checking -print-leaks
-check-initialization'

Finally, execute a.out.

Note the barrage of memory leak information reports printed to the console,
finishing with the line:

number of leaked objects: 49

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

libc6 recommends no packages.

-- no debconf information



Reply to: