RFR: 8222334: java -Xss0 triggers StackOverflowError
Patrick Zhang OS
patrick at os.amperecomputing.com
Fri Apr 12 07:24:14 UTC 2019
Hi,
Please review this patch.
The problem is that the launcher does a check on the input -Xss and ensure it >=64K for the initial thread, while vm has another function to determine whether the input stack size is big enough to future threads, such as cgc_thread, vm_thread, java_thead etc. However if -Xss0, the initial thread is created with stack size 64K, while others use hotspot/system default sizes, which would trigger StackOverflowError. We could either fine tune the threshold 64K to be a bigger one, or have the initial thread created with system defaults that may be what the user expects. This patch chooses the second solution, to avoid potential side-effect of the first.
This can be reproduced with 10, 11, 12 too, so I cc'ed jdk-updates-dev here.
More details please refer to the ticket.
JBS: https://bugs.openjdk.java.net/browse/JDK-8222334
Webrev: http://cr.openjdk.java.net/~qpzhang/8222334/webrev.01/
Thanks for David's comments in Jira.
Regards
Patrick
More information about the jdk-updates-dev
mailing list