https://bugs.winehq.org/show_bug.cgi?id=56136
Bug ID: 56136 Summary: ImageGetDigestStream does not behave the same as on windows Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: imagehlp Assignee: wine-bugs@winehq.org Reporter: hkarlsson@gmail.com Distribution: ---
Created attachment 75814 --> https://bugs.winehq.org/attachment.cgi?id=75814 Isolated the function and ran it side by side with real windows function to test results
Just wanted to report that ImageGetDigestStream does not match the windows (11) version. I suspect this is very low prio and rarely used. It is used by Unreal's ShaderCompileWorker.exe as a way to verify dxcompiler.dll version (and a couple more dlls). The reason it is used is to get same version between signed and unsigned binaries. I tried fixing it up myself but got stuck on some weirdness related to .rsrc section when not having CERT_PE_IMAGE_DIGEST_RESOURCES set (which is a scenario Unreal is not using). Since our usecase is detouring system calls I ended up putting a specialized (and very limited) version of ImageGetDigestStream into our code to workaround the problem for Unreal (The notes section inside wine source code also says that this function is only tested with 32-bit so I suspect this code is very old and extremely rarely used
I've attached a hacked up version where my usecase works but there are lots of cases not working so I didn't want to create a pull request.