APP CRASH MoveFileExW import issue
Created by: meridumates
What version of DynamoRIO are you using? DynamoRIO-Windows-7.0.0-RC1
Does the latest build from https://github.com/DynamoRIO/dynamorio/wiki/Latest-Build solve the problem? This is the latest
What operating system version are you running on? Windows 7, x64 EN
What application are you running? Test_MoveFileEx.exe, which is a simple console application that calls a single function (MoveFileExW).
Is your application 32-bit or 64-bit? 32-bit debug build
How are you running the application under DynamoRIO? <drrun.exe -c winafl.dll -target_module Test_MoveFileEx.exe -target_offset 0x20 -fuzz_iterations 10 -nargs 1 -- Test_MoveFileEx.exe>
What happens when you run without any client? Test_MoveFileEx.exe performs as expected (moves a file)
What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)? App crash occurs as well
What steps will reproduce the problem?
- run the application under DynamoRIO
What is the expected output? What do you see instead? Is this an application crash, a DynamoRIO crash, a DynamoRIO assert, or a hang (see https://github.com/DynamoRIO/dynamorio/wiki/Bug-Reporting and set the title appropriately)? The expected output is for the executable to run to completion ten times. The closest description that matches this issue is "APP CRASH," since the application does in fact crash.
Please provide any additional information below. The issue appears to be with how DynamoRIO attempts to import MoveFileExW. On the version of Windows I am running, MoveFileExW is only exported by kernel32.dll. However, DynamoRIO attempts to import MoveFileExW from kernelbase.dll. The import fails (and a DynamoRIO notification message pops up), and the app crashes immediately afterwards Test_MoveFileEx.exe.0.5436.txt. Attached is the log (.html saved as .txt) file generated with the log level set to three. Search for "MoveFileExW" to find a good starting reference.