mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[KMTESTS:RTL]
- Add some simple tests for RtlRaiseStatus to the RtlException test - Add missing volatile in (disabled) stack overflow test that caused an infinite loop on GCC builds CORE-8773 svn path=/trunk/; revision=66351
This commit is contained in:
parent
d6caab357b
commit
c845f97fbf
2 changed files with 19 additions and 1 deletions
|
@ -55,6 +55,7 @@ typedef ULONG LOGICAL, *PLOGICAL;
|
||||||
#define ExFreePoolWithTag(p, tag) HeapFree(GetProcessHeap(), 0, p)
|
#define ExFreePoolWithTag(p, tag) HeapFree(GetProcessHeap(), 0, p)
|
||||||
#define RtlCopyMemoryNonTemporal RtlCopyMemory
|
#define RtlCopyMemoryNonTemporal RtlCopyMemory
|
||||||
#define RtlPrefetchMemoryNonTemporal(s, l)
|
#define RtlPrefetchMemoryNonTemporal(s, l)
|
||||||
|
#define ExRaiseStatus RtlRaiseStatus
|
||||||
#endif /* defined KMT_EMULATE_KERNEL */
|
#endif /* defined KMT_EMULATE_KERNEL */
|
||||||
|
|
||||||
#endif /* defined KMT_USER_MODE */
|
#endif /* defined KMT_USER_MODE */
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
|
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define KMT_EMULATE_KERNEL
|
||||||
#include <kmt_test.h>
|
#include <kmt_test.h>
|
||||||
|
|
||||||
START_TEST(RtlException)
|
START_TEST(RtlException)
|
||||||
|
@ -39,13 +40,29 @@ START_TEST(RtlException)
|
||||||
KmtEndSeh(STATUS_ACCESS_VIOLATION);
|
KmtEndSeh(STATUS_ACCESS_VIOLATION);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
KmtStartSeh()
|
||||||
|
ExRaiseStatus(STATUS_ACCESS_VIOLATION);
|
||||||
|
KmtEndSeh(STATUS_ACCESS_VIOLATION);
|
||||||
|
|
||||||
|
KmtStartSeh()
|
||||||
|
ExRaiseStatus(STATUS_TIMEOUT);
|
||||||
|
KmtEndSeh(STATUS_TIMEOUT);
|
||||||
|
|
||||||
|
KmtStartSeh()
|
||||||
|
ExRaiseStatus(STATUS_STACK_OVERFLOW);
|
||||||
|
KmtEndSeh(STATUS_STACK_OVERFLOW);
|
||||||
|
|
||||||
|
KmtStartSeh()
|
||||||
|
ExRaiseStatus(STATUS_GUARD_PAGE_VIOLATION);
|
||||||
|
KmtEndSeh(STATUS_GUARD_PAGE_VIOLATION);
|
||||||
|
|
||||||
/* We cannot test this in kernel mode easily - the stack is just "somewhere"
|
/* We cannot test this in kernel mode easily - the stack is just "somewhere"
|
||||||
* in system space, and there's no guard page below it */
|
* in system space, and there's no guard page below it */
|
||||||
#if CORE_6640_IS_FIXED
|
#if CORE_6640_IS_FIXED
|
||||||
#ifdef KMT_USER_MODE
|
#ifdef KMT_USER_MODE
|
||||||
/* Overflow the stack - must cause a special exception */
|
/* Overflow the stack - must cause a special exception */
|
||||||
KmtStartSeh()
|
KmtStartSeh()
|
||||||
PCHAR Pointer;
|
volatile CHAR *Pointer;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue