DynamoRIO / DynamoRIO/drmemory
Dr. Memory fails with "dbghelp.dll: library initializer failed.."
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When running `drmemory` with an executable compiled with the `mingw` toolchain pre-installed by CLion, the command `drmemory app.exe` immediately fails with `Unable to load client library: dbghelp.dll: library initializer failed..`.
**To Reproduce**
Steps to reproduce the behavior:
1. To test, I used
```c
#include
int main(void) {
printf("Hello, World!\n");
return 0;
}
```
2. I used the bundled CLion `mingw` toolchain, although this also happens with the bundled `cygwin` toolchain and simply using `gcc` on `main.c`. Then, I used `drmemory app.exe`.
3. As output, I get
```
~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\nasie\AppData\Roaming\Dr. Memory/resfile.10612 (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
```
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".) Yes, but logs don't appear.
- 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`. As output,
```
~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\nasie\AppData\Roaming\Dr. Memory/resfile.5392 (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
```
**Expected behavior**
I expect for the program to run normally and open a log file.
**Versions**
- Dr. Memory versions: I've tried 2.6.20103, 2.6.0, 2.5.0, and 2.4.0
- Does the latest version work?: No
- Windows version: Microsoft Windows 11 Home, Version 10.0.26100 Build 26100
- App version: 64-bit
**Additional context**
Dr. Memory has worked on my computer in the past, but I last used it over a year ago.
Contributor guide
Assessment
This issue has not been assessed yet.