Rémi Bernon : ntdll/tests: Check that creating huge thread stacks works.
Alexandre Julliard
julliard at winehq.org
Fri May 7 15:42:03 CDT 2021
Module: wine
Branch: master
Commit: b44fb883b03b8b8638eb91babbbde71399a45215
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b44fb883b03b8b8638eb91babbbde71399a45215
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri May 7 12:08:04 2021 +0200
ntdll/tests: Check that creating huge thread stacks works.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/virtual.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c
index 6980f10c85b..7d457e2d5b8 100644
--- a/dlls/ntdll/tests/virtual.c
+++ b/dlls/ntdll/tests/virtual.c
@@ -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++)
More information about the wine-cvs
mailing list