From 9a48129495f0bc2353a7d26946342c0858e97e2d Mon Sep 17 00:00:00 2001 From: csahu Date: Fri, 4 Mar 2016 14:45:48 +0530 Subject: [PATCH] 8130425: libjvm crash due to stack overflow in executables with 32k tbss/tdata Reviewed-by: kevinw, dholmes Contributed-by: cheleswer.sahu@oracle.com --- src/solaris/classes/java/lang/UNIXProcess.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/solaris/classes/java/lang/UNIXProcess.java b/src/solaris/classes/java/lang/UNIXProcess.java index cc3b59617..1793a8f35 100644 --- a/src/solaris/classes/java/lang/UNIXProcess.java +++ b/src/solaris/classes/java/lang/UNIXProcess.java @@ -225,9 +225,8 @@ final class UNIXProcess extends Process { 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); -- GitLab