1.1 --- a/src/share/vm/prims/jvmtiEnvThreadState.cpp Thu Jan 23 10:59:10 2014 -0500 1.2 +++ b/src/share/vm/prims/jvmtiEnvThreadState.cpp Fri Jan 24 00:20:37 2014 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -272,7 +272,7 @@ 1.11 // There can be a race condition between a VM_Operation reaching a safepoint 1.12 // and the target thread exiting from Java execution. 1.13 // We must recheck the last Java frame still exists. 1.14 - if (_thread->has_last_Java_frame()) { 1.15 + if (!_thread->is_exiting() && _thread->has_last_Java_frame()) { 1.16 javaVFrame* vf = _thread->last_java_vframe(&rm); 1.17 assert(vf != NULL, "must have last java frame"); 1.18 Method* method = vf->method();