patchDotGNU 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

Submitted by:  Miroslaw Dobrzanski-Neumann <miroslaw>
Submitted on:  Tue 01 Jun 2004 04:07:11 PM UTC  
Category:  None Priority:  7 - High
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Tue 01 Jun 2004 04:07:11 PM UTC, original submission:  

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.

Miroslaw Dobrzanski-Neumann <miroslaw>


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


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




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

Back to the top

Powered by Savane 3.5