PAL_TRY(VOID*, unused, NULL)
{
- volatile int* p = (volatile int *)0x11; // Invalid pointer
+ volatile int* p = (volatile int *)0x11000; // Invalid pointer
bTry = TRUE; // Indicate we hit the PAL_TRY block
FailingFunction(p); // Throw in function to fool C++ runtime into handling
Fail("ERROR: PAL_EXCEPT was hit without PAL_TRY being hit.\n");
}
- // Validate that the faulting address is correct; the contents of "p" (0x11).
- if (ex.GetExceptionRecord()->ExceptionInformation[1] != 0x11)
+ // Validate that the faulting address is correct; the contents of "p" (0x11000).
+ if (ex.GetExceptionRecord()->ExceptionInformation[1] != 0x11000)
{
- Fail("ERROR: PAL_EXCEPT ExceptionInformation[1] != 0x11\n");
+ Fail("ERROR: PAL_EXCEPT ExceptionInformation[1] != 0x11000\n");
}
bExcept = TRUE; // Indicate we hit the PAL_EXCEPT block
PAL_TRY(VOID*, unused, NULL)
{
- volatile int* p = (volatile int *)0x22; // Invalid pointer
+ volatile int* p = (volatile int *)0x22000; // Invalid pointer
bTry = TRUE; // Indicate we hit the PAL_TRY block
FailingFunction(p); // Throw in function to fool C++ runtime into handling
Fail("ERROR: PAL_EXCEPT was hit without PAL_TRY being hit.\n");
}
- // Validate that the faulting address is correct; the contents of "p" (0x22).
- if (ex.GetExceptionRecord()->ExceptionInformation[1] != 0x22)
+ // Validate that the faulting address is correct; the contents of "p" (0x22000).
+ if (ex.GetExceptionRecord()->ExceptionInformation[1] != 0x22000)
{
- Fail("ERROR: PAL_EXCEPT ExceptionInformation[1] != 0x22\n");
+ Fail("ERROR: PAL_EXCEPT ExceptionInformation[1] != 0x22000\n");
}
bExcept = TRUE; // Indicate we hit the PAL_EXCEPT block
_exit(FAIL);
}
- // Validate that the faulting address is correct; the contents of "p" (0x22).
- if (siginfo->si_addr != (void *)0x33)
+ // Validate that the faulting address is correct; the contents of "p" (0x33000).
+ if (siginfo->si_addr != (void *)0x33000)
{
- printf("ERROR: signal handler faulting address != 0x33\n");
+ printf("ERROR: signal handler faulting address != 0x33000\n");
_exit(FAIL);
}
bSignal = true;
- volatile int* p = (volatile int *)0x33; // Invalid pointer
+ volatile int* p = (volatile int *)0x33000; // Invalid pointer
*p = 3; // Causes an access violation exception
printf("ERROR: code was executed after the access violation.\n");