This commit is contained in:
Mikael Vidstedt 2020-07-10 23:12:29 -07:00
commit 09510a15a1
563 changed files with 574 additions and 744 deletions

View file

@ -87,8 +87,12 @@ final class ProcessHandleImpl implements ProcessHandle {
ThreadGroup tg = Thread.currentThread().getThreadGroup();
while (tg.getParent() != null) tg = tg.getParent();
ThreadGroup systemThreadGroup = tg;
// For a debug build, the stack shadow zone is larger;
// Increase the total stack size to avoid potential stack overflow.
int debugDelta = "release".equals(System.getProperty("jdk.debug")) ? 0 : (4*4096);
final long stackSize = Boolean.getBoolean("jdk.lang.processReaperUseDefaultStackSize")
? 0 : REAPER_DEFAULT_STACKSIZE;
? 0 : REAPER_DEFAULT_STACKSIZE + debugDelta;
ThreadFactory threadFactory = grimReaper -> {
Thread t = new Thread(systemThreadGroup, grimReaper,