rwfpl / rewolf-wow64ext

Helper library for x86 programs that runs under WOW64 layer on x64 versions of Microsoft Windows operating systems.
936 stars 299 forks source link

Crash on windows 10 when build with release mode. #10

Closed halx99 closed 7 years ago

halx99 commented 7 years ago

When I use any 64 API to operate a 64bits application, the follow exception occrued, but if I press 'continue' again and again, The result seems ok. default

default

Exception thrown at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A5D8.

Unhandled exception at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A5D8.

Exception thrown at 0x7703361D (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000018.

Unhandled exception at 0x7703361D (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000018.

The thread 0x2da8 has exited with code 0 (0x0). The thread 0x3da8 has exited with code 0 (0x0). Exception thrown at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A618.

Unhandled exception at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A618.

Exception thrown at 0x770403A0 (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000030.

Unhandled exception at 0x770403A0 (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000030.

Exception thrown at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A5E8.

Unhandled exception at 0x5A180094 in x-studio365.core.dll: 0xC0000005: Access violation writing location 0x08C0A5E8.

Exception thrown at 0x77048F36 (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000030.

Exception thrown at 0x77048F36 (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000030.

Unhandled exception at 0x77048F36 (ntdll.dll) in x-studio365.core.dll: 0xC0000005: Access violation reading location 0x00000030.

rwfpl commented 7 years ago

Can you share snippet of code that causes this issue?

halx99 commented 7 years ago

Here is the test project: rewolf-wow64ext-crash.zip

By the way, My Windows version is: 10.0.15007.1000 And debug mode also will trigger ‘Access violation' exception

rwfpl commented 7 years ago

Ah, I guess new win10 build had to break something. I'll take a closer look then, thanks for reporting!

halx99 commented 7 years ago

Thanks, looking forward your response

rwfpl commented 7 years ago

The current wow64ext code interferes with the Return Flow Guard (RFG) mitigation, I'm checking if it can be easily fixed, stay tuned.

rwfpl commented 7 years ago

Fixed https://github.com/rwfpl/rewolf-wow64ext/commit/fd28b57fe926f3e57540850c37cdbcc766173dba

halx99 commented 7 years ago

Wow, great job, thanks, let me try immediately.

halx99 commented 7 years ago

This project is very useful for me to develop the Unity64bit Lua Project Debug tool, thanks again for you bring this excellent Project.