--
---
You received this message because you are subscribed to the Google Groups "Dr. Memory Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drmemory-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I tried:
#include "stdafx.h"
#include <malloc.h>
void leaky2()
{
FILE *fps[100];
int i;
for (i=0; i<100; i++)
fps[i] = fopen("buildlog.htm", "r");
for (i=0; i<50; i++)
fclose(fps[i]);
}
int _tmain(int argc, _TCHAR* argv[])
{
void *junk;
leaky2();
junk = malloc(100);
return 0;
}
And still get:
0 unique, 0 total handle leak(s)
One possible suggestion for when I choose Tools | Dr. Memory. It
doesn't build the target exe even if there are changes. It would be
nice if it could work like F5 (Start Debugging) does. That is, if
there are changes, ask if you want to build the exe first.
It would also be nice if there was an accelerator (an underlined
letter) for the Dr. Memory menu item. So I could do Alt+T, Y for
example.
Can you confirm that:
1, you opened file 100 times successfully, check the tps array content.
2, using Windbg to confirm there are 50 file handles left open.
3, check potential_errors.txt if it is listed there.
O used all default settings when create the Windows console executable.
We know there are handles left open by system, that's why we put them in to potential errors, if you confirm it is not an error caused by you, just ignore it.
Can you confirm that:
1, you opened file 100 times successfully, check the tps array content.
2, using Windbg to confirm there are 50 file handles left open.
3, check potential_errors.txt if it is listed there.
O used all default settings when create the Windows console executable.l
We know there are handles left open by system, that's why we put them in to potential errors, if you confirm it is not an error caused by you, just ignore it.
On Sat, Feb 14, 2015 at 8:31 PM, 'Qin Zhao' via Dr. Memory Users
<drmemor...@googlegroups.com> wrote:
> I can try to run
> .\DrMemory-Windows-1.8.0-8\bin\drmemory.exe -debug -verbose 3
> -handle_leaks_only -- .\handle_leak.exe
When I try to run:
drmemory -debug -verbose 3 -handle_leaks_only -- handleleak.exe
I get:
~~Dr.M~~ Dr. Memory version 1.8.0
~~Dr.M~~ Running "handleleak.exe"
~~Dr.M~~ options are "`-verbose` `3` `-handle_leaks_only` -logdir
`C:\Users\<user>\AppData\Roaming\Dr. Memory`
-symcache_dir `C:\Users\<user>\AppData\Roaming\Dr. Memory\symcache`
-lib_blacklist C:\Windows*.d?? -resfile 7112 "
~~Dr.M~~ log dir is C:\Users\<user>\AppData\Roaming\Dr.
Memory\DrMemory-handleleak.exe.7112.000
~~Dr.M~~ ASSERT FAILURE (thread 8032):
d:\drmemory_package\common\utils.c:884: ok_to_fail (error finding
required syscall #)~~Dr.M~~ WARNING: application exited with abnormal
code 0xffffffff
The "General Tips" section of the "Debugging" Wiki page [1] says:
"Try the very latest version of Dr. Memory to see if any problem
you are hitting has already been resolved. Per-version builds are
available as self-extracting archives from [Use the Dr. Memory debug
build by passing this flag to the front-end:"
Where it seems to me something is missing after the phrase "are
available as self-extracting archives from"? Do I need some other
download to use the -debug option? I see a lot of talk about "debug
builds" but don't see where to get them.
[1] https://github.com/DynamoRIO/drmemory/wiki/Debugging#general-tips
I use TCC/LE [1] as my command shell but I don't think that should matter?
From global.<*>.log I see LOTS of warnings:
WARNING: could not find system call NtAdjustPrivilegesToken
WARNING: could not find system call NtCancelDeviceWakeupRequest
WARNING: could not find system call NtClose
WARNING: could not find system call NtConnectPort
WARNING: could not find system call NtCreateChannel
WARNING: could not find system call NtCreateEvent
--
On Mon, Feb 16, 2015 at 3:33 PM, TP <win...@gmail.com> wrote:
> I turned off the last two (and that didn't help), and will report back
> on disabling the first one after I restart my system (a longish
> process that I try to avoid), but I don't have my hopes up.
Turning off Comodo Internet Security 8.1's Enable enhanced protection
mode didn't help. Still see 130 "WARNING: could not find system call"
messages in global.*.log when I run:
drmemory -debug -verbose 3 -handle_leaks_only -- handleleak.exe
Is drmemory likely to run correctly if I install another copy of
Windows 7 inside a virtual machine like VMware Player for Windows
64-bit [1] or VirtualBox [2]? If so, I might try that and not install
any anti-virus software inside the virtual copy of Windows 7.
How likely do you think it will be for you to "fix" Dr Memory so it
can still find system calls even with Comodo Internet Security
installed?
How hard would it be for me to do that? I imagine I'd have to fully
understand DynamicRio.
I'm somewhat motivated to have a free way of detecting memory & handle
leaks for windows applications that will even detect leaks by .exe's
launched by CreateProcess() calls. If I can demonstrate to my
satisfaction that Dr Memory can do this, then I might add supporting
Dr Memory under Comodo as a long term project to work on (if you guys
decline).
On Mon, Feb 16, 2015 at 5:47 PM, 'Qin Zhao' via Dr. Memory Users
<drmemor...@googlegroups.com> wrote:
> Can you just try to run handleleak.exe or any program directly under windbg,
> and check the ntdll's NtClose, to see if any unusual asm code there?
windbg 6.12
Windows 7 SP1 64bit
In the Disassembly Window I put ntdll!NtClose in the Offset field and see:
ntdll!ZwClose:
00000000`778d13a0 4c8bd1 mov r10,rcx
00000000`778d13a3 b80c000000 mov eax,0Ch
00000000`778d13a8 0f05 syscall
00000000`778d13aa c3 ret
00000000`778d13ab 0f1f440000 nop dword ptr [rax+rax]
Tried:
drmemory -debug -handle_leaks_only -dr_debug -dr_ops "-msgbox_mask
0xf" -- handeleak.exe
and got:
ERROR: failed to create process for
"F:\document\Projects\VS2008\ImageProcessing\drmemory\handleleak\Debug\handeleak.exe":
<press enter to dismiss>
On Mon, Feb 16, 2015 at 11:18 PM, 'Derek Bruening' via Dr. Memory
Users <drmemor...@googlegroups.com> wrote:
> On Tue, Feb 17, 2015 at 2:02 AM, TP <win...@gmail.com> wrote:
>>
>> On Mon, Feb 16, 2015 at 5:47 PM, 'Qin Zhao' via Dr. Memory Users
>> <drmemor...@googlegroups.com> wrote:
>> > Can you just try to run handleleak.exe or any program directly under
>> > windbg,
>> > and check the ntdll's NtClose, to see if any unusual asm code there?
>>
>> windbg 6.12
>> Windows 7 SP1 64bit
>>
>> In the Disassembly Window I put ntdll!NtClose in the Offset field and see:
>>
>> ntdll!ZwClose:
>> 00000000`778d13a0 4c8bd1 mov r10,rcx
>> 00000000`778d13a3 b80c000000 mov eax,0Ch
>> 00000000`778d13a8 0f05 syscall
>> 00000000`778d13aa c3 ret
>> 00000000`778d13ab 0f1f440000 nop dword ptr [rax+rax]
>
>
> That's 64-bit. Weren't you running a 32-bit app before?
That' still the handleleak.exe I built with Debug | Win32
configuration. I am running it under Windows 7 SP1 64bit however.
Windbg is from "C:\Program Files\Debugging Tools for Windows (x64)\windbg.exe"
WinDbg 6.12.0002.633 AMD64
How likely do you think it will be for you to "fix" Dr Memory so it
can still find system calls even with Comodo Internet Security
installed?
How hard would it be for me to do that? I imagine I'd have to fully
understand DynamicRio.
Here is what I get now for WinDbg 6.12.0002.633 X86, when I do U ntdll!NtClose:
0:000> U ntdll!NtClose
ntdll!NtClose:
77a7f9e0 ff251e00ae71 jmp dword ptr ds:[71AE001Eh]
77a7f9e6 c9 leave
77a7f9e7 8d542404 lea edx,[esp+4]
77a7f9eb 64ff15c0000000 call dword ptr fs:[0C0h]
77a7f9f2 83c404 add esp,4
77a7f9f5 c20400 ret 4