[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and to
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 32a1e14a66dc8e6426b26662573fb1278403140b |
Date: |
Sat, 05 Sep 2009 17:20:47 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET engine, compilers and tools (pnet)".
The branch, master has been updated
via 32a1e14a66dc8e6426b26662573fb1278403140b (commit)
from 5b1e6b3f79c186b6719c36fc40798ea253b41cc7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/pnet.git/commit/?id=32a1e14a66dc8e6426b26662573fb1278403140b
commit 32a1e14a66dc8e6426b26662573fb1278403140b
Author: Klaus Treichel <address@hidden>
Date: Sat Sep 5 19:07:24 2009 +0200
Fix a self deadlock if compiling an il function with jit coder fails.
diff --git a/ChangeLog b/ChangeLog
index 8ec5d41..e104ba1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-05 Klaus Treichel <address@hidden>
+
+ * engine/convert.c (ConvertMethod): Unlock the metadata here if the
+ function doesn't return with success.
+
+ * engine/jitc.c (_ILJitOnDemandDriver): Unlock the metadata on failure
+ only if the on demand compiler function was != _ILJitCompile because
+ the metadata was unlocked there in case of failure.
+ (_ILJitCompile): Unlock the metadata if there is no method attached to
+ the jit function to be consistent with _ILConvertMethod.
+
2009-09-03 Klaus Treichel <address@hidden>
* support/no_thread.c: Delete obsolete file
diff --git a/engine/convert.c b/engine/convert.c
index a68ae97..2938b1f 100644
--- a/engine/convert.c
+++ b/engine/convert.c
@@ -72,6 +72,7 @@ static unsigned char *ConvertMethod(ILExecThread *thread,
ILMethod *method,
if((ILMethod_CallConv(method) & IL_META_CALLCONV_MASK) ==
IL_META_CALLCONV_VARARG)
{
+ METADATA_UNLOCK(thread);
*errorCode = IL_CONVERT_NOT_IMPLEMENTED;
return 0;
}
@@ -91,6 +92,7 @@ static unsigned char *ConvertMethod(ILExecThread *thread,
ILMethod *method,
if(!_ILVerify(coder, &start, method, &code,
ILImageIsSecure(ILProgramItem_Image(method)), thread))
{
+ METADATA_UNLOCK(thread);
*errorCode = IL_CONVERT_VERIFY_FAILED;
return 0;
}
@@ -99,6 +101,7 @@ static unsigned char *ConvertMethod(ILExecThread *thread,
ILMethod *method,
{
/* All other cases should be handled in the jit coder. */
+ METADATA_UNLOCK(thread);
*errorCode = IL_CONVERT_OUT_OF_MEMORY;
return 0;
}
@@ -577,7 +580,7 @@ unsigned char *_ILConvertMethod(ILExecThread *thread,
ILMethod *method)
(ILObject
*)ILStringCreate(thread, errorInfo));
}
- ILExecThreadSetException(thread, obj);
+ ILExecThreadSetException(thread, obj);
}
break;
}
diff --git a/engine/jitc.c b/engine/jitc.c
index 7c12e62..5890523 100755
--- a/engine/jitc.c
+++ b/engine/jitc.c
@@ -2128,6 +2128,8 @@ static void _ILJitThrowCurrentException(ILJITCoder *coder)
jit_insn_throw(coder->jitFunction, thrownException);
}
+static int _ILJitCompile(jit_function_t func);
+
/*
* The on demand driver function for libjit.
*/
@@ -2248,8 +2250,12 @@ static void *_ILJitOnDemandDriver(ILJitFunction func)
/* Unlock the context. */
jit_context_build_end(context);
- /* Unlock the metadata. */
- METADATA_UNLOCK(process);
+ /* This is ugly but it's the only fast solution now */
+ if(onDemandCompiler != _ILJitCompile)
+ {
+ /* Unlock the metadata. */
+ METADATA_UNLOCK(process);
+ }
/* And throw an exception. */
jit_exception_builtin(result);
@@ -3455,6 +3461,7 @@ static int _ILJitCompile(jit_function_t func)
if(!method)
{
+ METADATA_UNLOCK(thread->process);
return JIT_RESULT_COMPILE_ERROR;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 11 +++++++++++
engine/convert.c | 5 ++++-
engine/jitc.c | 11 +++++++++--
3 files changed, 24 insertions(+), 3 deletions(-)
hooks/post-receive
--
DotGNU Portable.NET engine, compilers and tools (pnet)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 32a1e14a66dc8e6426b26662573fb1278403140b,
Klaus Treichel <=
- Prev by Date:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 5b1e6b3f79c186b6719c36fc40798ea253b41cc7
- Next by Date:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 59d694189026098b4cb888a445254a8b49b91d3e
- Previous by thread:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 5b1e6b3f79c186b6719c36fc40798ea253b41cc7
- Next by thread:
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 59d694189026098b4cb888a445254a8b49b91d3e
- Index(es):