diff options
author | Andrew Haley <aph@redhat.com> | 2008-09-23 13:51:58 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2008-09-23 13:51:58 +0000 |
commit | f0580031a7919f8e1401db1c2e6515e1682eaaa7 (patch) | |
tree | 5aa7ac0da62ededbaab14350de950b012a5759a3 /libjava/java/lang | |
parent | 5c0466b537af28f3cf7aff8d29c884a3c5725459 (diff) | |
download | gcc-f0580031a7919f8e1401db1c2e6515e1682eaaa7.zip gcc-f0580031a7919f8e1401db1c2e6515e1682eaaa7.tar.gz gcc-f0580031a7919f8e1401db1c2e6515e1682eaaa7.tar.bz2 |
re PR libgcj/8995 (race cases in interpreter)
2008-09-17 Andrew Haley <aph@redhat.com>
PR libgcj/8995:
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute):
Initialize thread_count.
* include/java-interp.h (_Jv_InterpMethod::thread_count): New
field.
(_Jv_InterpMethod::rewrite_insn_mutex): New mutex.
(_Jv_InterpFrame:: _Jv_InterpFrame): Pass frame_type.
* interpret.cc
(ThreadCountAdjuster): New class.
(_Jv_InterpMethod::thread_count): New field.
(_Jv_InitInterpreter): Initialize rewrite_insn_mutex.
Increment and decrement thread_count field in methods.
* interpret-run.cc (REWRITE_INSN): Check thread_count <= 1.
(REWRITE_INSN): Likewise.
Declare a ThreadCountAdjuster.
* java/lang/reflect/natVMProxy.cc (run_proxy): Initialize frame
type as frame_proxy.
From-SVN: r140593
Diffstat (limited to 'libjava/java/lang')
-rw-r--r-- | libjava/java/lang/reflect/natVMProxy.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/java/lang/reflect/natVMProxy.cc b/libjava/java/lang/reflect/natVMProxy.cc index a1b7dfc..4c3fd74 100644 --- a/libjava/java/lang/reflect/natVMProxy.cc +++ b/libjava/java/lang/reflect/natVMProxy.cc @@ -350,7 +350,8 @@ run_proxy (ffi_cif *cif, // than about Proxy.class itself. FRAME_DESC has a destructor so it // cleans up automatically when this proxy invocation returns. Thread *thread = Thread::currentThread(); - _Jv_InterpFrame frame_desc (self->self, thread, proxyClass); + _Jv_InterpFrame frame_desc (self->self, thread, proxyClass, + NULL, frame_proxy); // The method to invoke is saved in $Proxy0.m[method_index]. // FIXME: We could somewhat improve efficiency by storing a pointer |