Commit b44fb883 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ntdll/tests: Check that creating huge thread stacks works.

parent 6f9562db
......@@ -488,6 +488,11 @@ static DWORD WINAPI test_stack_size_thread(void *ptr)
ExitThread(0);
}
static DWORD WINAPI test_stack_size_dummy_thread(void *ptr)
{
return 0;
}
static void test_RtlCreateUserStack(void)
{
IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress );
......@@ -565,6 +570,14 @@ static void test_RtlCreateUserStack(void)
WaitForSingleObject(thread, INFINITE);
CloseHandle(thread);
if (is_win64)
{
thread = CreateThread(NULL, 0x80000000, test_stack_size_dummy_thread, NULL, STACK_SIZE_PARAM_IS_A_RESERVATION, NULL);
ok(thread != NULL, "CreateThread with huge stack failed\n");
WaitForSingleObject(thread, INFINITE);
CloseHandle(thread);
}
args.expect_committed = default_commit < 0x2000 ? 0x2000 : default_commit;
args.expect_reserved = 0x100000;
for (i = 0; i < 32; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment