DynamoRIO / DynamoRIO/drmemory

Dr. Memory internal crash??

Open
#2,551 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Compile enything with and without `-g` with LLVM CLang
2. Run Dr Memory with `drmemory -leaks_only -- program`.
3. And we have it.

Please also answer these questions drawn from https://drmemory.org/page_help.html#sec_narrow :
- Does the problem go away when running in light mode (pass `-light` to Dr. Memory)? -> No
- Does the problem go away when running with the options `-leaks_only -no_count_leaks -no_track_allocs`? -> No
- Does the problem go away when running under plain DynamoRIO? Do this by running `dynamorio/bin32/drrun -- ` or `dynamorio/bin64/drrun -- ` depending on the bitwidth of your applicaiton. (Ignore warnings about "incomplete installation".) -> I have no idea what's this
- What happens with the debug version of Dr. Memory and of its underlying engine DynamoRIO? Try this by passing `-debug -dr_debug -pause_at_assert`. Are any messages reported? -> Nothing works, just error "internal crash" error

**Expected behavior**
I want to see the memory leaks

**Screenshots or Pasted Text**

![Image](https://github.com/user-attachments/assets/adca7621-a370-4a52-b548-35856b76b8da)

**Versions**
- What version of Dr. Memory are you using? -> Dr. Memory version 2.6.20167 -- build 0
- Does the latest build from
https://drmemory.org/page_download.html#sec_latest_build solve the problem? -> Nope
- What operating system version are you running on? -> Windows 11 x64 24H2
- Is your application 32-bit or 64-bit? -> 64 bit

**Additional context**
```cpp
// #include "_INCLUDES.hpp" // Ignore this

#include
#include
#include

int main() {
int64_t* leak = (int64_t*)malloc(sizeof(int64_t)); // Intentional memory leak
*leak = 1955;
fmt::println("var = {}\t{} bytes at {}", *leak, sizeof(*leak), (void*)leak);
return 0;
}
```

Terminal (PowerShell 7)
```sh
00:24 ~.\II. The First Trials - A2 [1ms]
~$ .\exc2
var = 1955 8 bytes at 0x13caf80

00:24 ~.\II. The First Trials - A2 [10ms]
~$ clang++ -g -o Exc2 Exc2.cpp -std=c++23

00:24 ~.\II. The First Trials - A2 [1s 688ms]
~$ .\exc2
var = 1955 8 bytes at 0x82be60

00:24 ~.\II. The First Trials - A2 [13ms]
~$ drmemory -debug Exc2.exe

~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\David Sirait\AppData\Roaming\Dr. Memory/resfile.11644 (code=2).
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
~~Dr.M~~ WARNING: application exited with abnormal code 0xffffffff

00:24 ~.\II. The First Trials - A2 [1s 373ms] [-1]
~$ drmemory -leaks_only Exc2.exe

~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\David Sirait\AppData\Roaming\Dr. Memory/resfile.28668 (code=2).
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
~~Dr.M~~ WARNING: application exited with abnormal code 0xffffffff

00:24 ~.\II. The First Trials - A2 [887ms] [-1]
~$
```

![Image](https://github.com/user-attachments/assets/9fdaca0b-86ab-469b-aa1c-50a102c61297)

![Image](https://github.com/user-attachments/assets/9215f875-cf28-4c8f-ac21-6c4f88148a68)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.