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

Uninits and leaks on ipconfig #473

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

Uninits and leaks on ipconfig #473

derekbruening opened this issue Nov 28, 2014 · 2 comments

Comments

@derekbruening
Copy link
Contributor

From timurrrr@google.com on June 23, 2011 06:44:03

$ drmemory.exe -suppress -- ipconfig

UNINITIALIZED READ: reading 0x003b9f4c-0x003b9f50 4 byte(s) within 0x003b9f48-0x003b9f50
@0:00:02.765 in thread 4064
system call NtDeviceIoControlFile InputBuffer

[different frames]
0x76d63ee3 <iphlpapi.dll+0x3ee3> iphlpapi.dll!GetAdaptersAddresses
0x76d63eae <iphlpapi.dll+0x3eae> iphlpapi.dll!GetAdaptersAddresses
0x01003e7f <ipconfig.exe+0x3e7f> ipconfig.exe!?

also,
UNINITIALIZED READ: reading 0x0007be70-0x0007be80 16 byte(s) within 0x0007be6c-0x0007be80
(with a similar stack)

The report was first seen on Chromium then I've decided to run "ipconfig" as a reproducer.

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

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on June 28, 2011 01:34:09

Also a possible leak:
(with PDB symbols)
Error #9: POSSIBLE LEAK 4368 direct bytes 0x02bd0658-0x02bd1768 + 0 indirect bytes
0x606d93b1 <ESENT.dll+0x293b1> ESENT.dll!MpHeapCreate
0x606d9241 <ESENT.dll+0x29241> ESENT.dll!FOSMemoryPreinit
0x606d7139 <ESENT.dll+0x27139> ESENT.dll!FOSPreinit
0x7c90118a <ntdll.dll+0x118a> ntdll.dll!LdrpCallInitRoutine
0x7c91b5d2 <ntdll.dll+0x1b5d2> ntdll.dll!LdrpRunInitializeRoutines
0x7c9162db <ntdll.dll+0x162db> ntdll.dll!LdrpLoadDll
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
0x76d66909 <iphlpapi.dll+0x6909> iphlpapi.dll!GetPerAdapterInfo
0x76d66a6a <iphlpapi.dll+0x6a6a> iphlpapi.dll!GetPerAdapterInfo

(w/o symbols)
Error #9: POSSIBLE LEAK 4368 direct bytes 0x015e0658-0x015e1768 + 0 indirect bytes
0x606d93b1 <ESENT.dll+0x293b1> ESENT.dll!JetBeginSession
0x606d9241 <ESENT.dll+0x29241> ESENT.dll!JetBeginSession
0x606d7139 <ESENT.dll+0x27139> ESENT.dll!JetBeginSession
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
0x76d66909 <iphlpapi.dll+0x6909> iphlpapi.dll!GetPerAdapterInfo
0x76d66a6a <iphlpapi.dll+0x6a6a> iphlpapi.dll!GetPerAdapterInfo

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on June 28, 2011 01:34:53

(forgot to attach a repro source code for the JetBeginSession possible leak:
#include <windows.h>
#include <iptypes.h>
#include <iphlpapi.h>
#pragma comment(lib, "iphlpapi.lib")

extern "C" {
// the headers didn't work for me for some reason
ULONG WINAPI GetAdaptersAddresses(ULONG Family, ULONG Flags, PVOID Reserved, PVOID AdapterAddresses, PULONG SizePointer);
}

int main(void) {
char info_temp[1024];
ULONG len = 0;
ULONG result = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, &info_temp, &len);
return 0;
}

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