mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
fix exception filters
svn path=/trunk/; revision=30838
This commit is contained in:
parent
0241a0c838
commit
4497838ce7
1 changed files with 22 additions and 7 deletions
|
@ -215,14 +215,22 @@ UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||||
NTSTATUS ErrCode;
|
NTSTATUS ErrCode;
|
||||||
|
|
||||||
if (ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION &&
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION &&
|
||||||
ExceptionInfo->ExceptionRecord->ExceptionInformation[0])
|
ExceptionInfo->ExceptionRecord->NumberParameters >= 2)
|
||||||
{
|
{
|
||||||
/* Change the protection on some write attempts, some InstallShield setups
|
switch(ExceptionInfo->ExceptionRecord->ExceptionInformation[0])
|
||||||
have this bug */
|
{
|
||||||
RetValue = BasepCheckForReadOnlyResource(
|
case EXCEPTION_WRITE_FAULT:
|
||||||
(PVOID)ExceptionInfo->ExceptionRecord->ExceptionInformation[1]);
|
/* Change the protection on some write attempts, some InstallShield setups
|
||||||
if (RetValue == EXCEPTION_CONTINUE_EXECUTION)
|
have this bug */
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
RetValue = BasepCheckForReadOnlyResource(
|
||||||
|
(PVOID)ExceptionInfo->ExceptionRecord->ExceptionInformation[1]);
|
||||||
|
if (RetValue == EXCEPTION_CONTINUE_EXECUTION)
|
||||||
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
|
break;
|
||||||
|
case EXCEPTION_EXECUTE_FAULT:
|
||||||
|
/* FIXME */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is there a debugger running ? */
|
/* Is there a debugger running ? */
|
||||||
|
@ -241,6 +249,13 @@ UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GlobalTopLevelExceptionFilter)
|
||||||
|
{
|
||||||
|
LONG ret = GlobalTopLevelExceptionFilter( ExceptionInfo );
|
||||||
|
if (ret != EXCEPTION_CONTINUE_SEARCH)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
|
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
|
||||||
{
|
{
|
||||||
#ifdef _X86_
|
#ifdef _X86_
|
||||||
|
|
Loading…
Reference in a new issue