DynamoRIO / DynamoRIO/drmemory
Dr Memory Crashes after Drag and Drop my App
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [harshava...@gmail.com](https://code.google.com/u/118265210217335906544/) on September 17, 2014 13:41:10_
What steps will reproduce the problem? 1. I wrote a simple Win32 console application in Visual Studio 2010 which leaks some memory.
2. Drag and Dropped the generated *.exe on Dr Memory.
3. Tool shows up a dialog with an error message. What is the expected output? What do you see instead? Application should run for 50 seconds and terminate. Dr Memory should show the memory leaked by the application. What version of the product are you using? On what operating system? DrMemory-Windows-1.8.0-8, Windows 7 64 Bit Machine
Does the problem go away when running in light mode (pass "-light" to Dr.
Memory)? What about when running with the options "-leaks_only
-no_count_leaks -no_track_allocs"?
Not Tried Does the problem go away when using the most recent build from http://build.chromium.org/p/client.drmemory/builds/? Not Tried Try the debug version of Dr. Memory and of its underlying engine DynamoRIO by passing "-debug -dr_debug -pause_at_assert" to drmemory.exe. Are any messages reported? Facing some issues with this. Please provide any additional information below. Please also see the "Narrowing Down the Source of the Problem" section of https://code.google.com/p/drmemory/wiki/Debugging . attached the crash screenshots.
Sample memory leak code
---------------------------
// MemLeakExe.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
void LeakyFunction()
{
char *p = new char[100];
}
void NonLeakyFunction()
{
char\* p1 = new char[200];
delete[] p1;
}
int _tmain(int argc, _TCHAR\* argv[])
{
int i = 0;
while(i <= 50)
{
NonLeakyFunction();
LeakyFunction();
Sleep(1000);
i++;
}
return 0;
}
**Attachment:** [Dr Memory Crash.jpg](http://code.google.com/p/drmemory/issues/detail?id=1631)
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=1631_
Contributor guide
Research direction
Start by reproducing the drag-and-drop case with DrMemory-Windows-1.8.0-8 on Windows 7 using the supplied MemLeakExe.cpp sample and review the attached crash screenshot. Then try the listed light, leak, debug, and DynamoRIO options; done means the application runs to completion and Dr. Memory reports its leak instead of crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100