Closed virtuald closed 3 years ago
Without SEH support, it's not safe to execute the code that is currently guarded by try / except. You'll crash at runtime, you should be able to easily verify this by running any of the tests, they will most likely crash instantly.
I'm not sure it makes sense to even support detours being built and run in this configuration.
Also, since #107 is merged, it doesn't make much sense to include those changes here.
I am actively using this code and detours works fine under MinGW with this patch applied. I haven't tried the tests, but we're able to hook arbitrary functions/instructions without further modifications.
I'm sure that if the API is used to access some invalid piece of memory that a crash would occur instead of an error code as intended. But since MinGW doesn't support SEH, I guess I would tell someone "don't do that", or "don't use MinGW + Detours for production code".
How did you compile it with mingw, by hand or using different makefiles?
Using different makefiles. I used cmake, very simple.
Merging this as it appears harmless and enables this corner case scenario. Thanks @virtuald sorry for the delay!
What the title says. MinGW doesn't support
__try
and__except
, so it's just defined out here as it doesn't seem there's a better way to handle it.Note: Includes #107