DynamoRIO / DynamoRIO/dynamorio

Relocation failure loading client library

Open
#4,995 8 comments 0 reactions 0 assignees View on GitHub
help wanted OpSys-Windows
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Unable to load client library

**To Reproduce**
Steps to reproduce the behavior:
1. Compile code with
```
cl test.c /I D:/DynamoRIO-Windows-8.0.0-1/include /GS- /DWINDOWS /DX86_64 /link /libpath:D:\DynamoRIO-Windows-8.0.0-1\lib64\release dynamorio.lib /dll /out:test.dll /base:0x72000000 /fixed
```
2. Then run
```
drrun -c D:\DynamoRIO-Windows-8.0.0-1\samples\test.dll -- notepad
```
3. Output:
```
DynamoRIO Notice: C:\Windows\system32\notepad.exe (7716), Unable
to load client library:
D:\DynamoRIO-Windows-8.0.0-1\samples\test.dll.
Error opening instrumentation library
D:\DynamoRIO-Windows-8.0.0-1\samples\test.dll:
.
```

Please also answer these questions:
- What happens when you run without any client?
Runs normal
- What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)?

   DynamoRIO Notice: C:\Windows\system32\notepad.exe (7716)

Error opening instrumentation library
D:\DynamoRIO-Windows-8.0.0-1\samples\test.dll:
(..\..\core\lib\instrument.c, line 570)
version 8.0.0, build 1
-no_dynamic_options -client_lib
'D:\DynamoRIO-Windows-8.0.0-1\samples\test.dll;0;'
-code_api -probe_api_stack_size 56K -max_elide_jmp 0
-max_elide_call 0 -no_inline_ignored_syscalls
-native_exec_default_list '' -no_native_exec_managed_code
-no_indcall2direct

**Expected behavior**
prints "running" on cmd

**Versions**
- What version of DynamoRIO are you using?
8.0.0-1
- Does the latest build from https://github.com/DynamoRIO/dynamorio/releases solve the problem?
No
- What operating system version are you running on? ("Windows 10" is *not* sufficient: give the release number.)
Windows 10.0.19042
- Is your application 32-bit or 64-bit?
64-bit

**Additional context**

cl version 19.16.27045 for x64
Visual Studio 2017

Code:
```C
#include "dr_api.h"

DR_EXPORT void
dr_client_main(client_id_t id, int argc, const char *argv[])
{
dr_set_client_name("test", "http://dynamorio.org/issues");
if (dr_is_notify_on()){
dr_enable_console_printing();
dr_fprintf(STDERR, "running\n");
}
}
```

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.