[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c |
Date: |
Mon, 18 Aug 2008 10:34:55 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 08/08/18 10:34:55
Modified files:
. : ChangeLog
engine : jitc.c
Log message:
Fix a race in _ILJitOnDemandDriver.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3560&r2=1.3561
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc.c?cvsroot=dotgnu-pnet&r1=1.82&r2=1.83
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3560
retrieving revision 1.3561
diff -u -b -r1.3560 -r1.3561
--- ChangeLog 17 Aug 2008 16:45:38 -0000 1.3560
+++ ChangeLog 18 Aug 2008 10:34:54 -0000 1.3561
@@ -1,3 +1,10 @@
+2008-08-18 Klaus Treichel <address@hidden>
+
+ * engine/jitc.c (_ILJitOnDemandDriver): Add check if the current
function
+ is compiled after holding the metadata lock to prevent the function from
+ being compiled multiple times if called from different threads at the
+ same time (race).
+
2008-08-17 Klaus Treichel <address@hidden>
* engine/engine.c (ILExecEngineDestroy): Clear some of the thread's
stack
Index: engine/jitc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/jitc.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- engine/jitc.c 1 Jun 2008 08:25:04 -0000 1.82
+++ engine/jitc.c 18 Aug 2008 10:34:54 -0000 1.83
@@ -2115,6 +2115,18 @@
return entry_point;
}
+ /* Check if the function is compiled now */
+ if(jit_function_is_compiled(func))
+ {
+ if(jit_function_compile_entry(func, &entry_point))
+ {
+ /* Unlock the metadata. */
+ METADATA_UNLOCK(process);
+
+ return entry_point;
+ }
+ }
+
/* Set the function info in the jit coder. */
jitCoder->jitFunction = func;
ILCCtorMgr_SetCurrentMethod(&(jitCoder->cctorMgr), method);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c,
Klaus Treichel <=