----- Original Message -----
From: xxxxx@gmail.com
To: “Kernel Debugging Interest List” Sent: Thursday, May 5, 2011 2:27:38 PM Subject: [windbg] Detect Memory Corruption in Windows
I created a memory corruption by the following statement: char *msg = “Default message”; free(msg);
This causes the memory corruption panic as: Break instruction exception - code 80000003 (first chance)
How to detect and debug memory corruption issues in Windows probably using Windbg? What all are the windbg commands needed?
I created a memory corruption by the following statement:
char *msg = “Default message”;
free(msg);
This causes the memory corruption panic as:
Break instruction exception - code 80000003 (first chance)
80000003 is an intentional breakpoint. Usually (but not always), that
means there was a failed assertion, and usually (but not always) there
will be a message on the debugger or mentioned in the code before the
break that tells you more about the problem.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
You have tried to free the memory you have not allocated. Free is a MSVCRT library call, and requires memory be allocated, via calloc, malloc or realloc prior to being freed.
char *msg = “Default message”;
// The “Default message” text is pushed on the stack, and hence should not be freed.
Break instruction exception - code 80000003 (first chance)
// This is expected if run under the debugger.
On Thu, May 5, 2011 at 8:27 PM, wrote: > How to detect and debug memory corruption issues in Windows probably using Windbg? > What all are the windbg commands needed?