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 authentification 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: NonePriority: 7 - High
Status: NonePrivacy: Public
Assigned to: NoneOpen/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 (2kB - 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 click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Tue 01 Jun 2004 04:07:11 PM UTCmiroslawAttached File-=>Added jit-thread.c.diff, #3331

Back to the top


Powered by Savane 3.1-cleanup