How to read a Dr Memory log

180 views
Skip to first unread message

Andreas Falkenhahn

unread,
Nov 28, 2020, 5:00:37 PM11/28/20
to drmemor...@googlegroups.com
Hi,

I'm just starting out with Dr Memory but the log file is somewhat confusing me. For example, I get this output in the log file:

Error #2: UNINITIALIZED READ: reading 0x000000000012f205-0x000000000012f206 1 byte(s)
# 0 setexecutablebits
# 1 setluahook
# 2 entry_main
# 3 wmain
Note: @0:00:02.688 in thread 7152
Note: instruction: cmp (%rcx,%r11) $0x2e

The output looks like a call stack but my setluahook() function doesn't call setexecutablebits() so that output doesn't make sense to me. In fact, setexecutablebits() is never called at all but still Dr Memory reports an uninitialized read in it.

Could anybody explain to me how to read that log entry? As I said, setexecutablebits() is never called but still Dr Memory reports an access fault...

--
Best regards,
Andreas Falkenhahn mailto:and...@falkenhahn.com

Derek Bruening

unread,
Dec 1, 2020, 3:19:59 PM12/1/20
to drmemor...@googlegroups.com
It is a callstack gathering issue.
What toolchain was this built with, and what flags?
Did you build your application with debug info?  It doesn't look like it.  That's the place to start.
Even then, callstacks are sometimes difficult to acquire.  If you could try these options:
  • -no_callstack_use_top_fp
  • -callstack_conservative
You could try "-pause_at_error" and attach a debugger and see what it thinks, but unfortunately
adding integration code to have a debugger nicely skip the instrumentation is unfinished so the top frame
will be confusing to the debugger: but it may well get the subsequent frames right, and is willing to spend
a  lot more time doing it that Dr. Memory, so you could see what it thinks.
--

---
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/drmemory-users/826147293.20201128230206%40falkenhahn.com.

Andreas Falkenhahn

unread,
Dec 6, 2020, 1:03:50 PM12/6/20
to Derek Bruening, Derek Bruening
On 01.12.2020 at 21:19 Derek Bruening wrote:

> It is a callstack gathering issue.
> What toolchain was this built with, and what flags?

The application was built with Visual C++ 15.00.30729.01 for x64 on Windows 7.

> Did you build your application with debug info? It doesn't look
> like it. That's the place to start.

What exactly do you mean by debug info? I have passed /debug to the linker to make it
generate a *.pdb file next to the executable. Is there anything else I need to do?

> Even then, callstacks are sometimes difficult to acquire. If you could try these options:
> -no_callstack_use_top_fp
> -callstack_conservative

Using -no_callstack_use_top_fp doesn't make a difference. When using -callstack_conservative,
however, the program just hangs after this error report:

~~Dr.M~~ Error #1: UNINITIALIZED READ: reading 0x000000000012e102-0x000000000012e104 2 byte(s) within 0x000000000012e100-0x000000000012e104
~~Dr.M~~ # 0 system call NtUserRegisterClassExWOW parameter value #4
~~Dr.M~~ # 1 USER32.dll!SendMessageTimeoutW +0x573 (0x00000000775ffea4 <USER32.dll+0xfea4>)
~~Dr.M~~ # 2 ole32.dll!StringFromGUID2 +0x2951 (0x000007fefd811732 <ole32.dll+0x21732>)
~~Dr.M~~ # 3 hwos_init
~~Dr.M~~ # 4 KERNEL32.dll!BaseThreadInitThunk +0xc (0x00000000774e556d <KERNEL32.dll+0x1556d>)
~~Dr.M~~ Note: @0:00:00.796 in thread 5912
Reply all
Reply to author
Forward
0 new messages