8130425: libjvm crash due to stack overflow in executables with 32k tbss/tdata
Reviewed-by: kevinw, dholmes
Contributed-by: cheleswer.sahu@oracle.com
--- a/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java Wed Feb 24 16:33:19 2016 -0500
+++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java Fri Feb 26 16:19:04 2016 +0530
@@ -81,9 +81,8 @@
ThreadGroup systemThreadGroup = tg;
ThreadFactory threadFactory = grimReaper -> {
- // Our thread stack requirement is quite modest.
- Thread t = new Thread(systemThreadGroup, grimReaper,
- "process reaper", 32768);
+ long stackSize = Boolean.getBoolean("jdk.lang.processReaperUseDefaultStackSize") ? 0 : 32768;
+ Thread t = new Thread(systemThreadGroup, grimReaper, "process reaper", stackSize);
t.setDaemon(true);
// A small attempt (probably futile) to avoid priority inversion
t.setPriority(Thread.MAX_PRIORITY);