Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-08

Dr Memory Interpretation

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

mark diener

Jonas Maebe suggested that I try Dr Memory to track down a possible heap corruption in one of my test programs.

This has led to what I think deserves it own discussion thread.

I ran a lazarus 1.2.4/fpc 2.6.4 compiled programs on Windows 8.1 x64 compilied with Dwarf2 (-dw2)
and HeapTrc On, Range Check ON (-Cr), Verify Method On (-CR)

The minimal example is just creating a simple lazarus application with a single unpopulated form. Compile. Run.

Attached is the results file and the sample minimal app for verification.

Command line for Dr Memory: C:\pdev\rpztestminimum>drmemory.exe -- rpztestminimum.exe <enter>

Heaptrc when turned on with CMEM commented out reports no heap errors.

What I find suprising is the number of ERRORS that Dr Memory discovered on a raw, naked, simple lazarus application.

Anybody have greater experience with Dr Memory to know what errors are actually real and which errors are valid in the latests releases of lazarus/fpc.

Cheers,

marco

Reply by email

Jonas Maebe
to mark diener
mark diener wrote
Anybody have greater experience with Dr Memory to know what errors are actually real and which errors are valid in the latests releases of lazarus/fpc.

* Not actual errors:

Error #1: UNADDRESSABLE ACCESS: reading 0x04c491c3-0x04c491c4 1 byte(s) within 0x04c491c0-0x04c491c4
# 0 FPC_PCHAR_TO_SHORTSTR [C:/pdev/ rpztestminimum//rpztestminimum.lpr:21]

Error #2: UNADDRESSABLE ACCESS: reading 0x0508cf61-0x0508cf64 3 byte(s) within 0x0508cf60-0x0508cf64
# 0 SYSTEM_SMALLFORWARDMOVE_3

Error #3: UNADDRESSABLE ACCESS: reading 0x050ee701-0x050ee704 3 byte(s) within 0x050ee700-0x050ee704
# 0 SYSUTILS_STRSCAN$PCHAR$CHAR$
$PCHAR [C:/pdev/ rpztestminimum//rpztestminimum.lpr:21]

* No idea, but probably not real errors since otherwise the program would crash:

Error #4: UNADDRESSABLE ACCESS: writing 0x00000020-0x00000024 4 byte(s) within 0x00000020-0x04c5c950
# 0 system call NtUserBuildPropList parameter #1

Error #5: UNADDRESSABLE ACCESS: writing 0x00000020-0x00000024 4 byte(s) within 0x00000020-0x04c5c950
# 0 system call NtUserBuildPropList parameter #1

Error #6: UNADDRESSABLE ACCESS: writing 0x00000020-0x00000024 4 byte(s) within 0x00000020-0x04c5ceb0
# 0 system call NtUserBuildPropList parameter #1

Error #7: UNADDRESSABLE ACCESS: writing 0x00000020-0x00000024 4 byte(s) within 0x00000020-0x04c5ceb0
# 0 system call NtUserBuildPropList parameter #1

* Probably not an actual error (see my mail in the other thread)

Error #8: POSSIBLE LEAK 64 direct bytes 0x04c489d0-0x04c48a10 + 0 indirect bytes
# 0 replace_RtlAllocateHeap [d: \drmemory_package\common\alloc_replace.c:3076]

You'll have to ask help on the Dr Memory mailing list regarding errors #4 - #7. For the false positives #1 - #3 and #8 (and similar ones to #8), you'll have to create a suppression file: http://www.drmemory.org/docs/page_suppress.html

Jonas

Reply by email