[LLVMbugs] [Bug 22025] New: [ASan/Win] Creating a suspended thread leads to a deadlock
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 24 06:46:58 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=22025
Bug ID: 22025
Summary: [ASan/Win] Creating a suspended thread leads to a
deadlock
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: timurrrr at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Example code:
--------------------
#include <windows.h>
DWORD WINAPI thread_proc(void *) {
volatile char stack_buffer[42];
for (int i = 0; i < sizeof(stack_buffer); ++i)
stack_buffer[i] = 42;
return 0x42;
}
int main() {
DWORD exitcode;
HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, CREATE_SUSPENDED,
NULL);
ResumeThread(thr);
if (thr == 0)
return 1;
if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
return 2;
GetExitCodeThread(thr, &exitcode);
if (exitcode != 0x42)
return 3;
CloseHandle(thr);
}
--------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141224/39004a7e/attachment.html>
More information about the llvm-bugs
mailing list