2014-02-25 63 views
0

對於一個簡單的程序如下所示:內存集成博士到Visual Studio 201X

#include "stdafx.h" 

int _tmain(int argc, _TCHAR* argv[]) 
{ 
return 0; 
} 

我收到以下錯誤。

 Dr. Memory version 1.6.1 
    Running ""C:\Users\********\Documents\Visual Studio 2012\Projects\drmemory\Debug\drmemory.exe"" 

    Error #1: UNINITIALIZED READ: reading 4 byte(s) 
    system call NtClose parameter value #0 
     <system call> 
    ntdll.dll!ZwClose 
     ??:0 
    KERNELBASE.dll!ResumeThread 
     ??:0 
    KERNELBASE.dll!CreateDirectoryA 
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 

    Error #2: UNINITIALIZED READ: reading 4 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_ah.dll!?  
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 

    Error #3: UNADDRESSABLE ACCESS: reading 4 byte(s) 
    f_ah.dll!?  
     ??:0 
    KERNELBASE.dll!SetFilePointer 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 
    ntdll.dll!LdrGetProcedureAddressEx 
     ??:0 
    ntdll.dll!LdrGetProcedureAddressEx 
     ??:0 
    ntdll.dll!RtlRunOnceBeginInitialize 
     ??:0 
    ntdll.dll!LdrGetProcedureAddressEx 
     ??:0 
    ntdll.dll!NtWriteFile 
     ??:0 
    KERNELBASE.dll!WriteFile  
     ??:0 
    KERNELBASE.dll!WriteFile  
     ??:0 
    KERNEL32.dll!GetSystemTime 
     ??:0 

    Error #4: UNINITIALIZED READ: reading 4 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ICATCDLL.dll!?   
     ??:0 
    ntdll.dll!RtlReleaseRelativeName 
     ??:0 
    ntdll.dll!RtlRunOnceBeginInitialize 
     ??:0 
    ntdll.dll!RtlReleaseRelativeName 
     ??:0 
    ntdll.dll!RtlUnicodeStringToAnsiString 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 

    Error #5: UNINITIALIZED READ: reading register eax 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    USER32.dll!IsWindow 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ntdll.dll!ZwTestAlert 
     ??:0 

    Error #6: UNINITIALIZED READ: reading 4 byte(s) 
    system call NtClose parameter value #0 
     <system call> 
    ntdll.dll!ZwClose 
     ??:0 
    KERNELBASE.dll!ResumeThread 
     ??:0 
    KERNELBASE.dll!CreateDirectoryA 
     ??:0 
    f_acc.dll!Proc3  
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 

    Error #7: UNINITIALIZED READ: reading 4 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    USER32.dll!IsWindow 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 

    Error #8: UNINITIALIZED READ: reading 4 byte(s) 
    NSCCOR03.dll!?   
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlUnicodeStringToAnsiString 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 

    Error #9: UNINITIALIZED READ: reading 4 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlUnicodeStringToAnsiString 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 

    Error #10: UNINITIALIZED READ: reading 4 byte(s) 
    ICATCDLL.dll!Ordinal1  
     ??:0 
    ICATCDLL.dll!Ordinal1  
     ??:0 
    ICATCDLL.dll!Ordinal1  
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlUnicodeStringToAnsiString 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 

    Error #11: UNINITIALIZED READ: reading 4 byte(s) 
    ICDCNL.dll!?   
     ??:0 
    ICDCNL.dll!?   
     ??:0 
    ICDCNL.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlUnicodeStringToAnsiString 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    KERNELBASE.dll!GetVersionExA 
     ??:0 
    f_sps.DLL!DllUnregisterServer 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 

    Error #12: UNINITIALIZED READ: reading 4 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ntdll.dll!ZwTestAlert 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 
    ntdll.dll!RtlImageDirectoryEntryToData 
     ??:0 
    ntdll.dll!LdrGetProcedureAddressEx 
     ??:0 
    ntdll.dll!LdrGetProcedureAddressEx 
     ??:0 
    ILT+110(_wmainCRTStartup) 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 

    Error #13: UNINITIALIZED READ: reading 1 byte(s) 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 
    PaperHK.dll!?   
     ??:0 

    Error #14: LEAK 128 bytes 
    replace_malloc 
     d:\drmemory_package\common\alloc_replace.c(2292): 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ILT+110(_wmainCRTStartup) 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 

    Error #15: LEAK 260 bytes 
    replace_operator_new_nomatch 
     d:\drmemory_package\common\alloc_replace.c(2544): 
    f_ah.dll!Proc2 
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ILT+110(_wmainCRTStartup) 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 

    Error #16: LEAK 260 bytes 
    replace_operator_new_nomatch 
     d:\drmemory_package\common\alloc_replace.c(2544): 
    f_ah.dll!Proc2 
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ILT+110(_wmainCRTStartup) 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 

    Error #17: LEAK 260 bytes 
    replace_operator_new_nomatch 
     d:\drmemory_package\common\alloc_replace.c(2544): 
    f_ah.dll!Proc2 
     ??:0 
    f_ah.dll!Proc2 
     ??:0 
    ntdll.dll!wcsncmp 
     ??:0 
    ntdll.dll!EtwEventRegister 
     ??:0 
    ntdll.dll!LdrUnlockLoaderLock 
     ??:0 
    ntdll.dll!LdrLoadDll 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    KERNEL32.dll!LoadLibraryW 
     ??:0 
    NSCCOR03.dll!?   
     ??:0 
    ILT+110(_wmainCRTStartup) 
     ??:0 
    ntdll.dll!RtlInitializeExceptionChain 
     ??:0 

    ERRORS FOUND: 
      1 unique,  1 total unaddressable access(es) 
      12 unique, 456 total uninitialized access(es) 
      0 unique,  0 total invalid heap argument(s) 
      0 unique,  0 total GDI usage error(s) 
      0 unique,  0 total warning(s) 
      4 unique,  4 total, 908 byte(s) of leak(s) 
      0 unique,  0 total,  0 byte(s) of possible leak(s) 
    Details: C:\Users\******\AppData\Roaming\Dr. Memory\DrMemory-drmemory.exe.58248.000\results.txt 

我已經在三臺不同的PC上測試過了,我可以在所有的PCS上重現這個問題。

我懷疑這個問題可能與管理內存(?)的ntdll.dll有關。 任何幫助/指針在解決這個問題表示讚賞。

-Satish

回答

0

您在這裏有很多非操作系統提供的庫:f_ah.dll,PaperHK.dll,f_sps.DLL,NSCCOR03.dll。這些不是你的應用程序的一部分。它們大概來自您安裝在您計算機上的其他軟件(除此之外:您將這麼多庫注入到這個小應用程序中是相當令人不安的:您可能想要調查是否需要在您的機器上運行這樣的入侵軟件)。 Dr. Memory開發人員之前從未看到過這些錯誤,因爲他們只會出現在安裝了此特定軟件的計算機上。

您應該忽略來自這些庫的所有報告,方法是將它們的路徑添加到Dr. Memory的-lib_blacklist選項。例如,假設f_ah.dll和f_sps.DLL的路徑爲c:\ Program Files \ foo \,而其他路徑爲c:\ Program Files \ bar \,則可以使用以下選項運行Dr. Memory:

-lib_blacklist "c:\windows\syswow64\*.d??,c:\Program Files\foo\*.dll,c:\Program Files\bar\*.dll" 

Dr. Memory現在將隱藏其前4幀來自其中一個庫的任何錯誤報告。

您可能還想在Dr. Memory的問題跟蹤器中提交一個錯誤,要求開發人員查看這些錯誤,因爲它們可能是誤報。提供足夠的信息來重現(尤其是這些庫來自哪些應用程序)。

+0

謝謝您的詳細解釋! 。我會試着找出有關* .dll的更多信息並儘快提交報告。 –