summaryrefslogtreecommitdiff
path: root/indra/llplugin/slplugin/slplugin.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-01-17 16:06:27 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-01-17 16:06:27 +0000
commite36745eb986ec9dd04c7f4f6d7a7249b7d5286a2 (patch)
treee2107a6f3afd57fcc817a5b8ea3566295105d0d4 /indra/llplugin/slplugin/slplugin.cpp
parent500aaa16ff2aa35b318176fd01cfaba47376f5a5 (diff)
parent7acbd8ed8d73c507675d45360df07d232c431a8b (diff)
merge
Diffstat (limited to 'indra/llplugin/slplugin/slplugin.cpp')
-rw-r--r--indra/llplugin/slplugin/slplugin.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp
index 684bcf1207..b960565416 100644
--- a/indra/llplugin/slplugin/slplugin.cpp
+++ b/indra/llplugin/slplugin/slplugin.cpp
@@ -100,33 +100,8 @@ LPTOP_LEVEL_EXCEPTION_FILTER WINAPI MyDummySetUnhandledExceptionFilter(
BOOL PreventSetUnhandledExceptionFilter()
{
-// WARNING: This won't work on 64-bit Windows systems so we turn it off it.
-// It should work for any flavor of 32-bit Windows we care about.
-// If it's off, sometimes you will see an OS message when a plugin crashes
-#ifndef _WIN64
- HMODULE hKernel32 = LoadLibraryA( "kernel32.dll" );
- if ( NULL == hKernel32 )
- return FALSE;
-
- void *pOrgEntry = GetProcAddress( hKernel32, "SetUnhandledExceptionFilter" );
- if( NULL == pOrgEntry )
- return FALSE;
-
- unsigned char newJump[ 100 ];
- DWORD dwOrgEntryAddr = (DWORD)pOrgEntry;
- dwOrgEntryAddr += 5; // add 5 for 5 op-codes for jmp far
- void *pNewFunc = &MyDummySetUnhandledExceptionFilter;
- DWORD dwNewEntryAddr = (DWORD) pNewFunc;
- DWORD dwRelativeAddr = dwNewEntryAddr - dwOrgEntryAddr;
-
- newJump[ 0 ] = 0xE9; // JMP absolute
- memcpy( &newJump[ 1 ], &dwRelativeAddr, sizeof( pNewFunc ) );
- SIZE_T bytesWritten;
- BOOL bRet = WriteProcessMemory( GetCurrentProcess(), pOrgEntry, newJump, sizeof( pNewFunc ) + 1, &bytesWritten );
- return bRet;
-#else
- return FALSE;
-#endif
+ // remove the scary stuff that also isn't supported on 64 bit Windows
+ return TRUE;
}
////////////////////////////////////////////////////////////////////////////////