https://bugs.winehq.org/show_bug.cgi?id=54290
Bug ID: 54290 Summary: RtlAddFunctionTable does not work for modules with empty IMAGE_DIRECTORY_ENTRY_EXCEPTION Product: Wine Version: 7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: novae.harpist06@icloud.com Distribution: ---
Created attachment 73859 --> https://bugs.winehq.org/attachment.cgi?id=73859 Reproducer
RtlAddFunctionTable is generally called for code allocated by JIT engines and similar, however on Windows it also works for images, as long as the image has an empty IMAGE_DIRECTORY_ENTRY_EXCEPTION. This is sometimes used by packers.
On Wine, this does not work.
The problem is that dynamic entries are only enumerated if the memory does not belong to an image:
https://github.com/wine-mirror/wine/blob/0adec25f92219b5626b8ee3c1c13396d36e...
Code that reproduces the issue is attached.
Windows output:
VirtualAddress: 00072000 hello!!!!
Wine output:
VirtualAddress: 00072000 wine: Unhandled exception 0x80000003 in thread 2a4 at address 0000000180001007 (thread 02a4), starting debugger...
https://bugs.winehq.org/show_bug.cgi?id=54290
novae.harpist06@icloud.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase