From de25cee3b8523a1ea8761b766ba0df9396d93112 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 25 Sep 2023 19:26:02 +0200 Subject: [PATCH] When out-of-process build crashes with OOME, write heap dump --- .../core/src/main/java/org/teavm/tooling/daemon/BuildDaemon.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/core/src/main/java/org/teavm/tooling/daemon/BuildDaemon.java b/tools/core/src/main/java/org/teavm/tooling/daemon/BuildDaemon.java index 5d73c2711..418673c46 100644 --- a/tools/core/src/main/java/org/teavm/tooling/daemon/BuildDaemon.java +++ b/tools/core/src/main/java/org/teavm/tooling/daemon/BuildDaemon.java @@ -285,6 +285,7 @@ public class BuildDaemon extends UnicastRemoteObject implements RemoteBuildServi if (debugPort != 0) { arguments.add("-agentlib:jdwp=transport=dt_socket,quiet=y,server=y,address=" + debugPort + ",suspend=y"); } + arguments.add("-XX:+HeapDumpOnOutOfMemoryError"); arguments.add(BuildDaemon.class.getName());