# HG changeset patch # User dcubed # Date 1300196110 25200 # Node ID 216d916d5c12e9e2327c6910a3e2222461b86a1b # Parent 4f148718983ef66bd1d8f2673ddb4a1385e25ebe 7024234: 2/3 jvmti tests fail assert(!_oops_are_stale) failed: oops are stale on Win-AMD64 Summary: Move initialization of the '_instance' field to avoid race with ServiceThread start. Reviewed-by: dholmes, kamg, never, dsamersoff, ysr, coleenp, acorn diff -r 4f148718983e -r 216d916d5c12 src/share/vm/runtime/serviceThread.cpp --- a/src/share/vm/runtime/serviceThread.cpp Thu Mar 10 17:44:32 2011 +0100 +++ b/src/share/vm/runtime/serviceThread.cpp Tue Mar 15 06:35:10 2011 -0700 @@ -70,11 +70,10 @@ java_lang_Thread::set_priority(thread_oop(), NearMaxPriority); java_lang_Thread::set_daemon(thread_oop()); thread->set_threadObj(thread_oop()); + _instance = thread; Threads::add(thread); Thread::start(thread); - - _instance = thread; } }