< prev index next >
test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java
Print this page
rev 54472 : 8222334: java -Xss0 triggers StackOverflowError
Summary: Launcher to use the ThreadStackSize decided by hotpot or system if input is 0
Reviewed-by: dholmes
@@ -185,21 +185,28 @@
* Now try with a stack size that is not page aligned.
*/
checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, "513");
/*
+ * Try with 0k which indicates that the default thread stack size from JVM will be used
+ */
+ checkMinStackAllowed("-XX:ThreadStackSize=", ThreadStackSizeString, "0");
+
+ /*
* Now redo the same tests with the compiler thread stack size:
*/
checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "16");
min_stack_allowed = checkStack("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "64");
checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, min_stack_allowed);
checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "513");
+ checkMinStackAllowed("-XX:CompilerThreadStackSize=", CompilerThreadStackSizeString, "0");
/*
* Now redo the same tests with the VM thread stack size:
*/
checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "16");
min_stack_allowed = checkStack("-XX:VMThreadStackSize=", VMThreadStackSizeString, "64");
checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, min_stack_allowed);
checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, "513");
+ checkMinStackAllowed("-XX:VMThreadStackSize=", VMThreadStackSizeString, "0");
}
}
< prev index next >