hotspot/test/runtime/Thread/TooSmallStackSize.java
changeset 46346 4085295dcf51
parent 41070 496463b4e206
child 46351 1b8f8edb7775
--- a/hotspot/test/runtime/Thread/TooSmallStackSize.java	Thu Mar 23 17:45:13 2017 +0100
+++ b/hotspot/test/runtime/Thread/TooSmallStackSize.java	Thu Mar 23 11:10:55 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -182,11 +182,17 @@
         checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, min_stack_allowed);
 
         /*
+         * Now try with a stack size that is not page aligned.
+         */
+        checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, "513");
+
+        /*
          * Now redo the same tests with the compiler thread stack size:
          */
         checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "16");
         min_stack_allowed = checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "32");
         checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, min_stack_allowed);
+        checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "513");
 
         /*
          * Now redo the same tests with the VM thread stack size:
@@ -194,5 +200,6 @@
         checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "16");
         min_stack_allowed = checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "32");
         checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, min_stack_allowed);
+        checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, "513");
     }
 }