7024234: 2/3 jvmti tests fail assert(!_oops_are_stale) failed: oops are stale on Win-AMD64

Tue, 15 Mar 2011 06:35:10 -0700

author
dcubed
date
Tue, 15 Mar 2011 06:35:10 -0700
changeset 2623
216d916d5c12
parent 2620
4f148718983e
child 2624
46a56fac55c7

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

src/share/vm/runtime/serviceThread.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/serviceThread.cpp	Thu Mar 10 17:44:32 2011 +0100
     1.2 +++ b/src/share/vm/runtime/serviceThread.cpp	Tue Mar 15 06:35:10 2011 -0700
     1.3 @@ -70,11 +70,10 @@
     1.4      java_lang_Thread::set_priority(thread_oop(), NearMaxPriority);
     1.5      java_lang_Thread::set_daemon(thread_oop());
     1.6      thread->set_threadObj(thread_oop());
     1.7 +    _instance = thread;
     1.8  
     1.9      Threads::add(thread);
    1.10      Thread::start(thread);
    1.11 -
    1.12 -    _instance = thread;
    1.13    }
    1.14  }
    1.15  

mercurial