diff test/runtime/SharedArchiveFile/LimitSharedSizes.java @ 20586:03e6d34be1f5

8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize Summary: estimate the minimum required size for the misc code region and check if the specified misc code region size meets the minimum size requirement Reviewed-by: jiangli, dholmes
author ccheung
date Thu, 30 Oct 2014 13:38:00 -0700
parents 9c8439756c05
children
line wrap: on
line diff
--- a/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Fri Oct 24 10:28:19 2014 -0700
+++ b/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Thu Oct 30 13:38:00 2014 -0700
@@ -51,9 +51,12 @@
         // Known issue, JDK-8038422 (assert() on Windows)
         // new SharedSizeTestData("-XX:SharedMiscDataSize", "500k",    "miscellaneous data"),
 
-        // This will cause a VM crash; commenting out for now; see bug JDK-8038268
-        // @ignore JDK-8038268
-        // new SharedSizeTestData("-XX:SharedMiscCodeSize", "20k",     "miscellaneous code"),
+        // Too small of a misc code size should not cause a vm crash.
+        // It should result in the following error message:
+        // The shared miscellaneous code space is not large enough
+        // to preload requested classes. Use -XX:SharedMiscCodeSize=
+        // to increase the initial size of shared miscellaneous code space.
+        new SharedSizeTestData("-XX:SharedMiscCodeSize", "20k",     "miscellaneous code"),
 
         // these values are larger than default ones, but should
         // be acceptable and not cause failure