Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leaks when using getaddrinfo #436

Open
derekbruening opened this issue Nov 28, 2014 · 0 comments
Open

Possible memory leaks when using getaddrinfo #436

derekbruening opened this issue Nov 28, 2014 · 0 comments

Comments

@derekbruening
Copy link
Contributor

From timurrrr@google.com on June 03, 2011 10:48:18

Repros are given as examples here: http://msdn.microsoft.com/en-us/library/ms738519(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ms738520(v=vs.85).aspx run like this:
$ test.exe www.google.com 80
-> (besides known uninit reports)

Error #1: POSSIBLE LEAK 20 direct bytes 0x00c29ec0-0x00c29ed4 + 0 indirect bytes
0x76d64e1d <iphlpapi.dll+0x4e1d> iphlpapi.dll!IcmpCreateFile
0x76d64e95 <iphlpapi.dll+0x4e95> iphlpapi.dll!IcmpCreateFile
0x76d6546b <iphlpapi.dll+0x546b> iphlpapi.dll!GetNumberOfInterfaces
0x76d65351 <iphlpapi.dll+0x5351> iphlpapi.dll!GetNumberOfInterfaces
0x7c90118a <ntdll.dll+0x118a> ntdll.dll!LdrInitializeThunk
0x7c91b5d2 <ntdll.dll+0x1b5d2> ntdll.dll!LdrFindResourceDirectory_U
0x7c9162db <ntdll.dll+0x162db> ntdll.dll!RtlValidateUnicodeString
0x7c91643d <ntdll.dll+0x1643d> ntdll.dll!LdrLoadDll
0x7c801bbd <KERNEL32.dll+0x1bbd> KERNEL32.dll!LoadLibraryExW
0x7c801d72 <KERNEL32.dll+0x1d72> KERNEL32.dll!LoadLibraryExA
0x7c801da8 <KERNEL32.dll+0x1da8> KERNEL32.dll!LoadLibraryA
0x76f2ab0a <DNSAPI.dll+0xab0a> DNSAPI.dll!DnsGetLocalAddrArrayDirect
0x76f2ab98 <DNSAPI.dll+0xab98> DNSAPI.dll!DnsGetLocalAddrArrayDirect
0x76f28312 <DNSAPI.dll+0x8312> DNSAPI.dll!NetInfo_Build
0x76f27d0b <DNSAPI.dll+0x7d0b> DNSAPI.dll!DnsQueryConfig
0x76f27c15 <DNSAPI.dll+0x7c15> DNSAPI.dll!DnsQueryConfig
0x76f22e4b <DNSAPI.dll+0x2e4b> DNSAPI.dll!DnsQuery_W
0x71a5a129 <MSWSOCK.dll+0xa129> MSWSOCK.dll!SvchostPushServiceGlobals
0x71a5c7ce <MSWSOCK.dll+0xc7ce> MSWSOCK.dll!WSPStartup
0x71a5c90c <MSWSOCK.dll+0xc90c> MSWSOCK.dll!WSPStartup
0x71ab4ece <WS2_32.dll+0x4ece> WS2_32.dll!WSARecv
0x71ab4df6 <WS2_32.dll+0x4df6> WS2_32.dll!WSARecv
0x71ab4d91 <WS2_32.dll+0x4d91> WS2_32.dll!WSARecv
0x71ab2e96 <WS2_32.dll+0x2e96> WS2_32.dll!htons
0x71ab373e <WS2_32.dll+0x373e> WS2_32.dll!WSALookupServiceBeginW
0x71ab3673 <WS2_32.dll+0x3673> WS2_32.dll!WSALookupServiceBeginW
0x71ab6104 <WS2_32.dll+0x6104> WS2_32.dll!WSALookupServiceNextA
0x71ab9c2f <WS2_32.dll+0x9c2f> WS2_32.dll!WSAStringToAddressA
0x71ab5e58 <WS2_32.dll+0x5e58> WS2_32.dll!WSALookupServiceNextA
0x71ab5ddc <WS2_32.dll+0x5ddc> WS2_32.dll!WSALookupServiceNextA
0x00401175 <test.exe+0x1175> test.exe!wmain
test.cpp:75

and

Error #2: POSSIBLE LEAK 64 direct bytes 0x00c38068-0x00c380a8 + 0 indirect bytes
0x76d65cde <iphlpapi.dll+0x5cde> iphlpapi.dll!AllocateAndGetArpEntTableFromStack
0x76d65e49 <iphlpapi.dll+0x5e49> iphlpapi.dll!AllocateAndGetArpEntTableFromStack
0x76d65478 <iphlpapi.dll+0x5478> iphlpapi.dll!GetNumberOfInterfaces
0x76d65351 <iphlpapi.dll+0x5351> iphlpapi.dll!GetNumberOfInterfaces
0x7c90118a <ntdll.dll+0x118a> ntdll.dll!LdrInitializeThunk
0x7c91b5d2 <ntdll.dll+0x1b5d2> ntdll.dll!LdrFindResourceDirectory_U
0x7c9162db <ntdll.dll+0x162db> ntdll.dll!RtlValidateUnicodeString
0x7c91643d <ntdll.dll+0x1643d> ntdll.dll!LdrLoadDll
0x7c801bbd <KERNEL32.dll+0x1bbd> KERNEL32.dll!LoadLibraryExW
0x7c801d72 <KERNEL32.dll+0x1d72> KERNEL32.dll!LoadLibraryExA
0x7c801da8 <KERNEL32.dll+0x1da8> KERNEL32.dll!LoadLibraryA
0x76f2ab0a <DNSAPI.dll+0xab0a> DNSAPI.dll!DnsGetLocalAddrArrayDirect
0x76f2ab98 <DNSAPI.dll+0xab98> DNSAPI.dll!DnsGetLocalAddrArrayDirect
0x76f28312 <DNSAPI.dll+0x8312> DNSAPI.dll!NetInfo_Build
0x76f27d0b <DNSAPI.dll+0x7d0b> DNSAPI.dll!DnsQueryConfig
0x76f27c15 <DNSAPI.dll+0x7c15> DNSAPI.dll!DnsQueryConfig
0x76f22e4b <DNSAPI.dll+0x2e4b> DNSAPI.dll!DnsQuery_W
0x71a5a129 <MSWSOCK.dll+0xa129> MSWSOCK.dll!SvchostPushServiceGlobals
0x71a5c7ce <MSWSOCK.dll+0xc7ce> MSWSOCK.dll!WSPStartup
0x71a5c90c <MSWSOCK.dll+0xc90c> MSWSOCK.dll!WSPStartup
0x71ab4ece <WS2_32.dll+0x4ece> WS2_32.dll!WSARecv
0x71ab4df6 <WS2_32.dll+0x4df6> WS2_32.dll!WSARecv
0x71ab4d91 <WS2_32.dll+0x4d91> WS2_32.dll!WSARecv
0x71ab2e96 <WS2_32.dll+0x2e96> WS2_32.dll!htons
0x71ab373e <WS2_32.dll+0x373e> WS2_32.dll!WSALookupServiceBeginW
0x71ab3673 <WS2_32.dll+0x3673> WS2_32.dll!WSALookupServiceBeginW
0x71ab6104 <WS2_32.dll+0x6104> WS2_32.dll!WSALookupServiceNextA
0x71ab9c2f <WS2_32.dll+0x9c2f> WS2_32.dll!WSAStringToAddressA
0x71ab5e58 <WS2_32.dll+0x5e58> WS2_32.dll!WSALookupServiceNextA
0x71ab5ddc <WS2_32.dll+0x5ddc> WS2_32.dll!WSALookupServiceNextA
0x00401175 <test.exe+0x1175> test.exe!wmain
test.cpp:75

Original issue: http://code.google.com/p/drmemory/issues/detail?id=436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant