8151728: jni test crashes JVM assert(_handle != __null) failed: resolving NULL handle
authorcoleenp
Sat, 12 Mar 2016 07:23:20 -0500
changeset 37082 1a8577705228
parent 37079 a92fc7ba87a2
child 37083 8776e46aa542
8151728: jni test crashes JVM assert(_handle != __null) failed: resolving NULL handle Summary: New assert needs to check for null. Reviewed-by: hseigel, gtriantafill
hotspot/src/share/vm/classfile/javaClasses.cpp
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Mar 11 17:02:04 2016 +0100
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Sat Mar 12 07:23:20 2016 -0500
@@ -1687,7 +1687,7 @@
  public:
   BacktraceIterator(objArrayHandle result, Thread* thread) {
     init(result, thread);
-    assert(_methods->length() == java_lang_Throwable::trace_chunk_size, "lengths don't match");
+    assert(_methods.is_null() || _methods->length() == java_lang_Throwable::trace_chunk_size, "lengths don't match");
   }
 
   BacktraceElement next(Thread* thread) {