changeset 36421:84c6303771b8

8130425: libjvm crash due to stack overflow in executables with 32k tbss/tdata Reviewed-by: kevinw, dholmes Contributed-by: cheleswer.sahu@oracle.com
author csahu
date Fri, 26 Feb 2016 16:19:04 +0530
parents 1709f0cad63f
children 19c7bd1d11cd
files jdk/src/java.base/share/classes/java/lang/ProcessHandleImpl.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);