]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cc
1 // RUN: %clang_cl_asan -O0 %s -Fe%t
6 DWORD WINAPI
thread_proc(void *) {
7 volatile char stack_buffer
[42];
8 for (int i
= 0; i
< sizeof(stack_buffer
); ++i
)
15 HANDLE thr
= CreateThread(NULL
, 0, thread_proc
, NULL
, CREATE_SUSPENDED
, NULL
);
19 if (WAIT_OBJECT_0
!= WaitForSingleObject(thr
, INFINITE
))
22 GetExitCodeThread(thr
, &exitcode
);