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
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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.)

Attach Files:
   
   
Comment:
   

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.

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.9