Bug#351469: valgrind errors

2006-02-06 Thread Daniel Stenberg

Hi

I don't see how any of those errors are (lib)curl's fault. The first range is 
libc problems, and AFAIK we are calling the proper cleanup function for 
OpenSSL.


--
 Commercial curl and libcurl Technical Support: http://haxx.se/curl.html


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#351469: valgrind errors

2006-02-06 Thread Justin Pryzby
clone 351469 -1
reassign 351469 libc6 
retitle 351469  libc6: valgrind errs in getaddrinfo
found 351469 2.3.5-8
reassign -1 libssl0.9.8
retitle -1  libssl0.9.8: Please free remaining memory blocks
# found -1 0.9.8a-6
thanks

On Mon, Feb 06, 2006 at 01:42:40PM +0100, Daniel Stenberg wrote:
 Hi
 
 I don't see how any of those errors are (lib)curl's fault. The first range 
 is libc problems, and AFAIK we are calling the proper cleanup function for 
 OpenSSL.
Okay, I think I, at one point, hesitated to open a bug because I
assumed it was a known libc bug, but then was doing memory tests on my
application again today and couldn't see why I thought that.

I just ran wget with the same errors as curl, so you seem to be right.
I'm including a 10 line use of getaddrinfo (hacked copy of the file
from #304022), which displays the bug when run with

  valgrind --leak-check=full --show-reachable=yes ./addr

(Note that there are no memory leaks; this was #304022).

wget gives:
Resolving google.com... ==16095== Invalid read of size 4
==16095==at 0x4010FA0: (within /lib/ld-2.3.5.so)
==16095==by 0x40049C1: (within /lib/ld-2.3.5.so)
==16095==by 0x400651A: (within /lib/ld-2.3.5.so)
==16095==by 0x42B9A5F: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BA41A: _dl_open (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42BB92C: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BBA8D: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42965CD: __nss_lookup_function (in /lib/tls/libc-2.3.5.so)
==16095==by 0x426C3F6: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x426CE15: getaddrinfo (in /lib/tls/libc-2.3.5.so)
==16095==  Address 0x4319B60 is 24 bytes inside a block of size 27 alloc'd
==16095==at 0x401B41A: malloc (vg_replace_malloc.c:149)
==16095==by 0x4006722: (within /lib/ld-2.3.5.so)
==16095==by 0x42B9A5F: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BA41A: _dl_open (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42BB92C: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BBA8D: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42965CD: __nss_lookup_function (in /lib/tls/libc-2.3.5.so)
==16095==by 0x426C3F6: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x426CE15: getaddrinfo (in /lib/tls/libc-2.3.5.so)
==16095==by 0x8059D10: (within /usr/bin/wget)
==16095== 
==16095== Conditional jump or move depends on uninitialised value(s)
==16095==at 0x4008B13: (within /lib/ld-2.3.5.so)
==16095==by 0x42B9D69: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BA41A: _dl_open (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42BB92C: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BBA8D: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42965CD: __nss_lookup_function (in /lib/tls/libc-2.3.5.so)
==16095==by 0x426C3F6: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x426CE15: getaddrinfo (in /lib/tls/libc-2.3.5.so)
==16095==by 0x8059D10: (within /usr/bin/wget)
==16095==by 0x8075B61: (within /usr/bin/wget)
==16095== 
==16095== Conditional jump or move depends on uninitialised value(s)
==16095==at 0x40087D3: (within /lib/ld-2.3.5.so)
==16095==by 0x42B9D69: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BA41A: _dl_open (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42BB92C: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x400B026: (within /lib/ld-2.3.5.so)
==16095==by 0x42BBA8D: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so)
==16095==by 0x42965CD: __nss_lookup_function (in /lib/tls/libc-2.3.5.so)
==16095==by 0x426C3F6: (within /lib/tls/libc-2.3.5.so)
==16095==by 0x426CE15: getaddrinfo (in /lib/tls/libc-2.3.5.so)
==16095==by 0x8059D10: (within /usr/bin/wget)
==16095==by 0x8075B61: (within /usr/bin/wget)
#include string.h
#include netdb.h

int main()
{
	struct addrinfo hints, *res;

	memset(hints, 0, sizeof(hints));
	hints.ai_socktype = SOCK_STREAM;
	if (!getaddrinfo (basile.via.ecp.fr, 80, hints, res)) {
		freeaddrinfo(res);
	}

	return 0;
}