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

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

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>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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

Back to the top

Powered by Savane 3.13-0159.
Corresponding source code