Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #4995
Closed
Open
Issue created Jul 03, 2021 by Administrator@rootContributor

Relocation failure loading client library

Created by: PigeonJuno

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:

#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");
	}
}
Assignee
Assign to
Time tracking