DynamoRIO / DynamoRIO/drmemory

possible leaks in libcmt seen in tests/unloadMTd.dll

Open
#817 0 comments 0 reactions 0 assignees View on GitHub
Bug-FalsePositive Migrated OpSys-Windows Priority-Medium
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on March 06, 2012 16:11:33_

xref MinGW CRT possible leaks though here it's MSVC: issue #781 , issue #790 I'm omitting the bottom frames from 2-5 since identical to 1:

Error `#1`: POSSIBLE LEAK 27 direct bytes 0x00ead870-0x00ead88b + 0 indirect bytes
#0 unloadlibMTd.dll!_setenvp (0x6ff36317 )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdenvp.c:127
#1 unloadlibMTd.dll!_CRT_INIT (0x6ff3107c )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6ff3129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6ff311f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281
#4 ntdll.dll!LdrpCallInitRoutine (0x76ef9950 )
??:0
#5 ntdll.dll!LdrpRunInitializeRoutines (0x76efd8c9 )
??:0
#6 ntdll.dll!LdrpLoadDll (0x76efd78c )
??:0
#7 ntdll.dll!LdrLoadDll (0x76efc4d5 )
??:0
#8 KERNELBASE.dll!LoadLibraryExW (0x768c2288 )
??:0
#9 KERNELBASE.dll!LoadLibraryExA (0x768c22e5 )
??:0
#10 KERNEL32.dll!LoadLibraryA (0x767b49d8 )
??:0
#11 main (0x0038105e )
e:\src\drmemory\git\src\tests\unload.c:43

Error `#2`: POSSIBLE LEAK 544 direct bytes 0x00fe2368-0x00fe2588 + 0 indirect bytes
#0 unloadlibMTd.dll!_setmbcp (0x6ff398d3 )
f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c:593
#1 unloadlibMTd.dll!__initmbctable (0x6ff3a475 )
f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c:854
#2 unloadlibMTd.dll!_setargv (0x6ff3640d )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdargv.c:98
#3 unloadlibMTd.dll!_CRT_INIT (0x6ff31073 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#4 unloadlibMTd.dll!__DllMainCRTStartup (0x6ff3129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#5 unloadlibMTd.dll!_DllMainCRTStartup (0x6ff311f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#3`: POSSIBLE LEAK 83 direct bytes 0x00fe30d0-0x00fe3123 + 0 indirect bytes
#0 unloadlibMTd.dll!_setargv (0x6ff364ba )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdargv.c:142
#1 unloadlibMTd.dll!_CRT_INIT (0x6ff31073 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6ff3129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6ff311f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#4`: POSSIBLE LEAK 464 direct bytes 0x00fe3150-0x00fe3320 + 0 indirect bytes
#0 unloadlibMTd.dll!_setenvp (0x6ff362a0 )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdenvp.c:117
#1 unloadlibMTd.dll!_CRT_INIT (0x6ff3107c )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6ff3129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6ff311f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#5`: POSSIBLE LEAK 128 direct bytes 0x00feaaf0-0x00feab70 + 0 indirect bytes
#0 unloadlibMTd.dll!__onexitinit (0x6ff3ef6b )
f:\dd\vctools\crt_bld\self_x86\crt\src\onexit.c:208
#1 unloadlibMTd.dll!_initterm_e (0x6ff35aea )
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0dat.c:953
#2 unloadlibMTd.dll!_cinit (0x6ff354f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0dat.c:297
#3 unloadlibMTd.dll!_CRT_INIT (0x6ff31087 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#4 unloadlibMTd.dll!__DllMainCRTStartup (0x6ff3129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#5 unloadlibMTd.dll!_DllMainCRTStartup (0x6ff311f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

then we repeat with main() (again omitting bottom frames from 7-10 since identical to 6):

Error `#6`: POSSIBLE LEAK 27 direct bytes 0x00ead870-0x00ead88b + 0 indirect bytes
#0 unloadlibMTd.dll!_setenvp (0x6feb6317 )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdenvp.c:127
#1 unloadlibMTd.dll!_CRT_INIT (0x6feb107c )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6feb129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6feb11f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281
#4 ntdll.dll!LdrpCallInitRoutine (0x76ef9950 )
??:0
#5 ntdll.dll!LdrpRunInitializeRoutines (0x76efd8c9 )
??:0
#6 ntdll.dll!LdrpLoadDll (0x76efd78c )
??:0
#7 ntdll.dll!LdrLoadDll (0x76efc4d5 )
??:0
#8 KERNELBASE.dll!LoadLibraryExW (0x768c2288 )
??:0
#9 KERNELBASE.dll!LoadLibraryExA (0x768c22e5 )
??:0
#10 KERNEL32.dll!LoadLibraryA (0x767b49d8 )
??:0
#11 main (0x0038105e )
e:\src\drmemory\git\src\tests\unload.c:43

Error `#7`: POSSIBLE LEAK 544 direct bytes 0x01732368-0x01732588 + 0 indirect bytes
#0 unloadlibMTd.dll!_setmbcp (0x6feb98d3 )
f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c:593
#1 unloadlibMTd.dll!__initmbctable (0x6feba475 )
f:\dd\vctools\crt_bld\self_x86\crt\src\mbctype.c:854
#2 unloadlibMTd.dll!_setargv (0x6feb640d )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdargv.c:98
#3 unloadlibMTd.dll!_CRT_INIT (0x6feb1073 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#4 unloadlibMTd.dll!__DllMainCRTStartup (0x6feb129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#5 unloadlibMTd.dll!_DllMainCRTStartup (0x6feb11f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#8`: POSSIBLE LEAK 83 direct bytes 0x017330d0-0x01733123 + 0 indirect bytes
#0 unloadlibMTd.dll!_setargv (0x6feb64ba )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdargv.c:142
#1 unloadlibMTd.dll!_CRT_INIT (0x6feb1073 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6feb129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6feb11f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#9`: POSSIBLE LEAK 464 direct bytes 0x01733150-0x01733320 + 0 indirect bytes
#0 unloadlibMTd.dll!_setenvp (0x6feb62a0 )
f:\dd\vctools\crt_bld\self_x86\crt\src\stdenvp.c:117
#1 unloadlibMTd.dll!_CRT_INIT (0x6feb107c )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#2 unloadlibMTd.dll!__DllMainCRTStartup (0x6feb129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#3 unloadlibMTd.dll!_DllMainCRTStartup (0x6feb11f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

Error `#10`: POSSIBLE LEAK 128 direct bytes 0x0173aaf0-0x0173ab70 + 0 indirect bytes
#0 unloadlibMTd.dll!__onexitinit (0x6febef6b )
f:\dd\vctools\crt_bld\self_x86\crt\src\onexit.c:208
#1 unloadlibMTd.dll!_initterm_e (0x6feb5aea )
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0dat.c:953
#2 unloadlibMTd.dll!_cinit (0x6feb54f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\crt0dat.c:297
#3 unloadlibMTd.dll!_CRT_INIT (0x6feb1087 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:132
#4 unloadlibMTd.dll!__DllMainCRTStartup (0x6feb129a )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:312
#5 unloadlibMTd.dll!_DllMainCRTStartup (0x6feb11f1 )
f:\dd\vctools\crt_bld\self_x86\crt\src\dllcrt0.c:281

_Original issue: http://code.google.com/p/drmemory/issues/detail?id=817_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.