DotGNU Portable.NET - Patches: patch #3113, race condition in jit-thread.c
You are not allowed to post comments on this tracker with your current authentication level.
patch #3113: race condition in jit-thread.c
Submitter: | Miroslaw Dobrzanski-Neumann <miroslaw> | ||
Submitted: | Tue 01 Jun 2004 04:07:11 PM UTC | ||
Category: | None | Priority: | 7 - High |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Attached Files
file #7524: jit-thread.c.diff added by miroslaw (2KiB - application/octet-stream - fixed race condition in inti code for windows platform)
Depends on the following items: None found
Items that depend on this one: None found
CC list is empty
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2004-06-01 | miroslaw | Attached File | - | Added jit-thread.c.diff, #3331 |
Powered by Savane 3.13-caa5.
Corresponding source code
the following code snipped from libjit/jit/jit-thread.c contains a race condition. If a thread entering the if-branch is interrupted by scheduler in line 74, other thread will assume init_win32_thread() has already been called.
71 static LONG volatile once_control = 0;
72 if(!InterlockedExchange((PLONG)&once_control, 1))
73 {
74 init_win32_thread();
75 }
Attached you find a fix for this bug.