From f0580031a7919f8e1401db1c2e6515e1682eaaa7 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 23 Sep 2008 13:51:58 +0000 Subject: re PR libgcj/8995 (race cases in interpreter) 2008-09-17 Andrew Haley 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 --- libjava/java/lang/reflect/natVMProxy.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libjava/java/lang') 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 -- cgit v1.1