8175341: "java/util/Arrays/ParallelPrefix.java" Crash Internal Error ...diagnosticCommand.cpp...assert(k != __null) failed: FinalizerHistogram class is not accessible
authorcjplummer
Tue, 07 Mar 2017 13:35:34 -0800
changeset 46311 7545c36a5e76
parent 46310 a2358af6cc81
child 46314 f39171272d2b
8175341: "java/util/Arrays/ParallelPrefix.java" Crash Internal Error ...diagnosticCommand.cpp...assert(k != __null) failed: FinalizerHistogram class is not accessible Summary: allow the dcmd to fail with a pending exception rather than assert Reviewed-by: sspitsyn, dholmes
hotspot/src/share/vm/services/diagnosticCommand.cpp
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Tue Mar 07 11:35:45 2017 -0500
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Tue Mar 07 13:35:34 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -420,10 +420,8 @@
 void FinalizerInfoDCmd::execute(DCmdSource source, TRAPS) {
   ResourceMark rm;
 
-
-  Klass* k = SystemDictionary::resolve_or_null(
-    vmSymbols::finalizer_histogram_klass(), THREAD);
-  assert(k != NULL, "FinalizerHistogram class is not accessible");
+  Klass* k = SystemDictionary::resolve_or_fail(
+    vmSymbols::finalizer_histogram_klass(), true, CHECK);
 
   instanceKlassHandle klass(THREAD, k);
   JavaValue result(T_ARRAY);