--- old/hotspot/src/share/vm/runtime/jniHandles.cpp 2010-03-29 16:16:21.000000000 +0100 +++ new/hotspot/src/share/vm/runtime/jniHandles.cpp 2010-03-29 16:16:20.000000000 +0100 @@ -173,7 +173,12 @@ // is not permitted. return (thr->has_last_Java_frame() && (void*)obj < (void*)thr->stack_base() && - (void*)obj >= (void*)thr->last_Java_sp()); +#ifdef ZERO + (void*)obj >= (void*)thr->zero_stack()->sp() +#else + (void*)obj >= (void*)thr->last_Java_sp() +#endif // ZERO + ); }