0

对于一个简单的程序如下:

#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 上对其进行了测试,并且可以在所有 PC 中重现该问题。

我怀疑问题可能出在管理内存(?)的 ntdll.dll 上。感谢您提供解决问题的任何帮助/指示。

-Satish

4

1 回答 1

1

这里有很多非操作系统提供的库: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 的问题跟踪器中提交错误,要求开发人员查看这些错误,因为它们可能是误报。提供足够的信息来重现(特别是这些库来自哪些应用程序)。

于 2014-02-27T23:10:00.013 回答