Dr Memory hangs

55 views
Skip to first unread message

Andreas Falkenhahn

unread,
Nov 30, 2020, 9:43:52 AM11/30/20
to drmemor...@googlegroups.com
I'm trying to see if Dr Memory can detect memory access faults. This is my test program:

---------------------------------------------------
#include <stdio.h>

int main(int argc, char *argv[])
{
char a[32];
int k;

for(k = 0; k < atoi(argv[1]); k++) a[k] = 0;

return 0;
}
---------------------------------------------------

When I start it like this, everything is fine and Dr Memory doesn't report any problems
(as expected):

$ drmemory -- test.exe 32

When I try to provoke an access fault by starting it like this, however, Dr Memory hangs:

$ drmemory -- test.exe 33

This results in the following output:

~~Dr.M~~ Dr. Memory version 2.3.0
~~Dr.M~~ Running "test.exe 33"

And then Dr Memory just hangs. No access violation is reported and Dr Memory hangs forever.

Any ideas what's wrong there? I'm on Windows 7.

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

Derek Bruening

unread,
Dec 1, 2020, 3:26:12 PM12/1/20
to drmemor...@googlegroups.com
Clobbering memory can produce unpredictable effects.  What does the program do natively?  It might hang there too.

Note that Dr. Memory is not able to detect small overflows in stack buffers as it is not practical to insert redzones on stack variables dynamically.  This is true for all dynamic tools.  Only compiler-based tools are able to find such bugs.  Large stack buffer overflows that go beyond the top of the stack are detected by Dr. Memory, as are overflows in general of heap memory.

--

---
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/19910589230.20201130154524%40falkenhahn.com.
Reply all
Reply to author
Forward
0 new messages