Open cedric-ca opened 4 years ago
I cannot reproduce any problem. I don't have 1809: this is in 1909.
% cat i2264.cpp
class A
{
private:
size_t a_{0};
};
int
main(int argc, char * argv[])
{
A *v = new A();
return 0;
}
% cl /Zi /EHsc i2264.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25835 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
i2264.cpp
Microsoft (R) Incremental Linker Version 14.12.25835.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:i2264.exe
/debug
i2264.obj
% cd ../releases
% DrMemory-Windows-2.3.0-1/bin/drmemory -batch -- ../bugs/i2264.exe
~~Dr.M~~ Dr. Memory version 2.3.0
~~Dr.M~~ Running "../bugs/i2264.exe"
~~Dr.M~~ System call information is missing for this operating system: WinVer=105;Rel=1909;Build=18363;Edition=Enterprise. Restarting to trigger auto-generation of system call information. Re-run with -ignore_kernel to attempt to continue instead.
WARNING: System call information is missing for this operating system version. Attempting to auto-generate system call information...
drsys_find_sysnum_libs: C:\WINDOWS\system32\ntdll.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\kernelbase.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\kernel32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\gdi32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\imm32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\user32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\win32u.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\ntdll.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\kernelbase.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\kernel32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\gdi32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\imm32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\user32.dll is readable
drsys_find_sysnum_libs: C:\WINDOWS\system32\win32u.dll is readable
Symbol cache directory is "D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\symcache"
Fetching symbols for "C:\WINDOWS\system32\ntdll.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wntdll.pdb\C426B34E4A17C490B9C8608C500F9F8A1\wntdll.pdb"
Fetching symbols for "C:\WINDOWS\system32\kernelbase.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wkernelbase.pdb\B14231082613FCE2D92BE8FB6B5E1DD01\wkernelbase.pdb"
Fetching symbols for "C:\WINDOWS\system32\kernel32.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wkernel32.pdb\7D80824F9CCE7C819044B16FD421C63D1\wkernel32.pdb"
Fetching symbols for "C:\WINDOWS\system32\gdi32.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wgdi32.pdb\EC26B17219AF25A2531508809FB3C8821\wgdi32.pdb"
Fetching symbols for "C:\WINDOWS\system32\imm32.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wimm32.pdb\AFB23A7345810B3301B1114EEC34E5F21\wimm32.pdb"
Fetching symbols for "C:\WINDOWS\system32\user32.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wuser32.pdb\76E737D70F3F856A22566D8EB8D21EB01\wuser32.pdb"
Fetching symbols for "C:\WINDOWS\system32\win32u.dll", attempt #0
Successfully fetched or found symbols at "d:\derek\symbols\wwin32u.pdb\C09DDFC96D57A1CF40F804DF931A3C0C1\wwin32u.pdb"
Searching for system calls in "C:\WINDOWS\system32\ntdll.dll"
Found 483 system calls (0 usercalls) in "C:\WINDOWS\system32\ntdll.dll"
Searching for system calls in "C:\WINDOWS\system32\kernelbase.dll"
Found 14 system calls (0 usercalls) in "C:\WINDOWS\system32\kernelbase.dll"
Searching for system calls in "C:\WINDOWS\system32\kernel32.dll"
Found 0 system calls (0 usercalls) in "C:\WINDOWS\system32\kernel32.dll"
Searching for system calls in "C:\WINDOWS\system32\gdi32.dll"
Found 0 system calls (0 usercalls) in "C:\WINDOWS\system32\gdi32.dll"
Searching for system calls in "C:\WINDOWS\system32\imm32.dll"
Found 0 system calls (0 usercalls) in "C:\WINDOWS\system32\imm32.dll"
Searching for system calls in "C:\WINDOWS\system32\user32.dll"
Found 93 system calls (92 usercalls) in "C:\WINDOWS\system32\user32.dll"
Searching for system calls in "C:\WINDOWS\system32\win32u.dll"
Found 1256 system calls (0 usercalls) in "C:\WINDOWS\system32\win32u.dll"
Writing to "D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\symcache\syscalls_wow64.txt"
Successfully wrote "D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\symcache\syscalls_wow64.txt"
~~Dr.M~~ Auto-generation succeeded. Re-launching the application.
~~Dr.M~~ Dr. Memory version 2.3.0
~~Dr.M~~ Running "../bugs/i2264.exe"
~~Dr.M~~ Using system call file D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\symcache\syscalls_wow64.txt
~~Dr.M~~
~~Dr.M~~ Error #1: LEAK 4 direct bytes 0x0125a670-0x0125a674 + 0 indirect bytes
~~Dr.M~~ # 0 replace_operator_new [d:\drmemory_package\common\alloc_replace.c:2900]
~~Dr.M~~ # 1 main [d:\derek\drmemory\bugs\i2264.cpp:10]
~~Dr.M~~
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~ 0 unique, 0 total unaddressable access(es)
~~Dr.M~~ 0 unique, 0 total uninitialized access(es)
~~Dr.M~~ 0 unique, 0 total invalid heap argument(s)
~~Dr.M~~ 0 unique, 0 total GDI usage error(s)
~~Dr.M~~ 0 unique, 0 total handle leak(s)
~~Dr.M~~ 0 unique, 0 total warning(s)
~~Dr.M~~ 1 unique, 1 total, 4 byte(s) of leak(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~ 1 potential error(s) (suspected false positives)
~~Dr.M~~ (details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.3140.000\potential_errors.txt)
~~Dr.M~~ 2 potential leak(s) (suspected false positives)
~~Dr.M~~ (details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.3140.000\potential_errors.txt)
~~Dr.M~~ 29 unique, 176 total, 23708 byte(s) of still-reachable allocation(s)
~~Dr.M~~ (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.3140.000\results.txt
~~Dr.M~~ Fetching 1 symbol files...
~~Dr.M~~ [1/1] Fetching symbols for C:\Windows\SysWOW64\msvcrt.dll
WARNING: drfront_sym_exit failed 6
~~Dr.M~~ Fetched 0 symbol files successfully
% echo $?
0
Second run now that the syscalls are in place:
% DrMemory-Windows-2.3.0-1/bin/drmemory -batch -- ../bugs/i2264.exe
~~Dr.M~~ Dr. Memory version 2.3.0
~~Dr.M~~ Running "../bugs/i2264.exe"
~~Dr.M~~ Using system call file D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\symcache\syscalls_wow64.txt
~~Dr.M~~
~~Dr.M~~ Error #1: LEAK 4 direct bytes 0x0128a670-0x0128a674 + 0 indirect bytes
~~Dr.M~~ # 0 replace_operator_new [d:\drmemory_package\common\alloc_replace.c:2900]
~~Dr.M~~ # 1 main [d:\derek\drmemory\bugs\i2264.cpp:10]
~~Dr.M~~
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~ 0 unique, 0 total unaddressable access(es)
~~Dr.M~~ 0 unique, 0 total uninitialized access(es)
~~Dr.M~~ 0 unique, 0 total invalid heap argument(s)
~~Dr.M~~ 0 unique, 0 total GDI usage error(s)
~~Dr.M~~ 0 unique, 0 total handle leak(s)
~~Dr.M~~ 0 unique, 0 total warning(s)
~~Dr.M~~ 1 unique, 1 total, 4 byte(s) of leak(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~ 1 potential error(s) (suspected false positives)
~~Dr.M~~ (details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.13128.000\potential_errors.txt)
~~Dr.M~~ 2 potential leak(s) (suspected false positives)
~~Dr.M~~ (details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.13128.000\potential_errors.txt)
~~Dr.M~~ 29 unique, 176 total, 23708 byte(s) of still-reachable allocation(s)
~~Dr.M~~ (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: D:\derek\drmemory\releases\DrMemory-Windows-2.3.0-1\drmemory\logs\DrMemory-i2264.exe.13128.000\results.txt
~~Dr.M~~ Fetching 1 symbol files...
~~Dr.M~~ [1/1] Fetching symbols for C:\Windows\SysWOW64\msvcrt.dll
~~Dr.M~~ Fetched 1 symbol files successfully
% echo $?
0
There must be something particular about your machine or environment. There is a bug template which asks questions and points at information to help diagnose where the problem is: in fact, the template is marked as required. Did you delete it? There is a Github bug that is still not fixed where if you're not signed in to Github until you click "create issue" and only sign in then it allows a blank issue: maybe you hit that.
This is the key part of the template:
Please also answer these questions drawn from https://github.com/DynamoRIO/drmemory/wiki/Debugging#narrowing-down-the-source-of-the-problem :
-light
to Dr. Memory)?-leaks_only -no_count_leaks -no_track_allocs
?dynamorio/bin32/drrun -- <application and args>
or dynamorio/bin64/drrun -- <application and args>
depending on the bitwidth of your applicaiton. (Ignore warnings about "incomplete installation".)-debug -dr_debug -pause_at_assert
. Are any messages reported?Hi Derek,
I tried all the different option you mentioned, but it never works and exits with the same error code. What surprises me is that when I compare your output with mine I have the following line: <Running on newer-than-this-build "Microsoft Windows 10-1809 x64"> , which you don’t have just after this line: <Starting application c:\svn_\ConsoleApplication2\Debug\qlib.exe (23016)>
As you can’t reproduce the problem, I think that I will have to upgrade to Win 10-1909.
Thanks
If dynamorio/bin32/drrun -- <application and args>
does not work then this is not a Dr. Memory issue but a DynamoRIO issue. To not work on such a simple application probably means there is some invasive security software on this machine injecting code into every process and interfering with DynamoRIO.
Did dynamorio/bin32/drrun -debug -- <application and args>
not report any asserts or information? It just silently dies?
If you have access to a different Windows machine, I would try there. I suspect this is specific to some software installed on the machine.
I would use Process Explorer or a debugger to look at all the libraries present in this simple process (when launched natively: put a wait inside it or run it in the debugger to pause it). I would look for non-core-Windows libraries. If there is some library from antivirus or other software that may be the culprit.
The <Running on newer-than-this-build "Microsoft Windows 10-1809 x64">
should not matter here. I don't think upgrading will make a difference: 1809 certainly worked in the past.
Ok,
Effectivelly dynamorio/bin32/drrun --
Thanks a lot.
From: Derek Bruening notifications@github.com Sent: vendredi 21 février 2020 16:37 To: DynamoRIO/drmemory drmemory@noreply.github.com Cc: LUGNIER, Cédric (CA-CIB) cedric.lugnier@ca-cib.com; Author author@noreply.github.com Subject: Re: [DynamoRIO/drmemory] DrMemory exits with code 0xc0000005 under Windows 10-1809 x64 (#2264)
If dynamorio/bin32/drrun --
Did dynamorio/bin32/drrun -debug --
If you have access to a different Windows machine, I would try there. I suspect this is specific to some software installed on the machine.
I would use Process Explorer or a debugger to look at all the libraries present in this simple process (when launched natively: put a wait inside it or run it in the debugger to pause it). I would look for non-core-Windows libraries. If there is some library from antivirus or other software that may be the culprit.
The <Running on newer-than-this-build "Microsoft Windows 10-1809 x64"> should not matter here. I don't think upgrading will make a difference: 1809 certainly worked in the past.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/DynamoRIO/drmemory/issues/2264?email_source=notifications&email_token=AHO4PTOFQEYM5TX25OGGPITRD7YH7A5CNFSM4KYRR5G2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMTDCXA#issuecomment-589705564, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHO4PTLVIR7LSCV4RIGS6KTRD7YH7ANCNFSM4KYRR5GQ. This message and any attachments are intended for the sole use of its addressee. If you are not the addressee, please immediately notify the sender and then destroy the message. As this message and/or any attachments may have been altered without our knowledge, its content is not legally binding on Crédit Agricole Corporate and Investment Bank. All rights reserved. Crédit Agricole Corporate and Investment Bank’s Registered office: 12, Place des Etats-Unis - CS 70052 - 92547 Montrouge Cedex, France.
Ce message et ses pièces jointes sont destinés à l'usage exclusif de leur destinataire. Si vous recevez ce message par erreur, merci d'en aviser immédiatement l'expéditeur et de le détruire ensuite. Le présent message pouvant être altéré à notre insu, Crédit Agricole Corporate and Investment Bank ne peut pas être engagé par son contenu. Tous droits réservés. Siège social de Crédit Agricole Corporate and Investment Bank : 12, Place des Etats-Unis - CS 70052 - 92547 Montrouge Cedex, France. Where you have received a communication from Crédit Agricole Corporate and Investment Bank this may include information which constitutes an investment recommendation as defined by the European Market Abuse Regulation of 16 April 2014 (MAR), Investment Research as defined by the European Markets in Financial Instruments Directive of 15 May 2014 (MiFID II) or Investment Advice as defined by MiFID II. Where Investment Advice is provided, it should be noted that it is not provided on an independent basis.
Please see https://www.ca-cib.com/about-us/financial-information/general-disclaimer-sales-trading for more details regarding the important regulatory information in this regard.
If you have any questions in relation to MAR or MiFID II and their impact on your relationship with Crédit Agricole Corporate & Investment Bank please let your sales person know. Please refer to https://www.ca-cib.com/about-us/financial-information/dodd-frank-disclosures-and-notices for any Dodd-Frank Disclosure for U.S. Persons pursuant to CFTC Regulation 23.431
@derekbruening I can confirm that the same exact issue is occurred on GitHub Actions(GitHub-hosted runners Windows Server 2019) and after adding -light
option the issue is gone.
I install DrMemory with: choco install drmemory.portable --version=2.3.0 --confirm
and this is the command that I'm using right now.
Hi, DrMemory 2.3.0-1 exit with code under win 10-1809 The code was build with Visual Studio Enterprise 2017 Version 15.9.19
Here the output:
Here the result file
Here the code: