Created
December 4, 2023 01:03
-
-
Save davispuh/6c0ae7e5a10500a5b7a759b817e66214 to your computer and use it in GitHub Desktop.
Deadlock Wine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
CRITICAL_SECTION criticalSection; | |
LONG ExceptionHandler(EXCEPTION_POINTERS *ExceptionInfo) { | |
asm("int $0x03"); | |
return EXCEPTION_CONTINUE_SEARCH; | |
} | |
DWORD ThreadFunction(void*) { | |
EnterCriticalSection(&criticalSection); | |
LeaveCriticalSection(&criticalSection); | |
return 0; | |
} | |
int main() { | |
AddVectoredExceptionHandler(1, ExceptionHandler); | |
InitializeCriticalSection(&criticalSection); | |
EnterCriticalSection(&criticalSection); | |
CreateThread(NULL, 0, ThreadFunction, NULL, 0, NULL); | |
asm("int $0x03"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment