8151728: jni test crashes JVM assert(_handle != __null) failed: resolving NULL handle
Summary: New assert needs to check for null.
Reviewed-by: hseigel, gtriantafill
--- 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) {