8086073: Fix PrintStubCode for empty StubCodeGenerator.
authorgoetz
Thu, 11 Jun 2015 11:07:03 -0400
changeset 31343 63ace334eb46
parent 31342 dac85d382ac0
child 31344 2316eb7a0358
8086073: Fix PrintStubCode for empty StubCodeGenerator. Reviewed-by: kvn, lfoltan
hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Mon Jun 08 12:54:05 2015 +0200
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp	Thu Jun 11 11:07:03 2015 -0400
@@ -96,7 +96,7 @@
       toprint[toprint_len++] = cdesc;
       if (cdesc == _first_stub) { saw_first = true; break; }
     }
-    assert(saw_first, "must get both first & last");
+    assert(toprint_len == 0 || saw_first, "must get both first & last");
     // Print in reverse order:
     qsort(toprint, toprint_len, sizeof(toprint[0]), compare_cdesc);
     for (int i = 0; i < toprint_len; i++) {