Skip to content

Commit ad6ef9f

Browse files
committed
[GR-65416] Use -R:+EnableSignalHandling -R:+InstallSegfaultHandler instead of forcing them in the thin launchers
1 parent 54824fe commit ad6ef9f

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

sdk/mx.sdk/mx_sdk_vm_impl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,8 @@ def contents(self):
14171417

14181418
if isinstance(image_config, mx_sdk.LauncherConfig) or (isinstance(image_config, mx_sdk.LanguageLibraryConfig) and image_config.launchers):
14191419
build_args += [
1420+
'-R:+EnableSignalHandling',
1421+
'-R:+InstallSegfaultHandler',
14201422
'--enable-monitoring=jvmstat,heapdump,jfr,threaddump',
14211423
] + svm_experimental_options([
14221424
'-H:+InstallExitHandlers',

sdk/mx.sdk/mx_sdk_vm_ng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class LanguageLibraryProject(NativeImageLibraryProject):
376376
def get_build_args(self):
377377
build_args = super().get_build_args()[:]
378378

379-
# Signals flags, the first 2 are also set in AbstractLanguageLauncher but better to be explicit
379+
# Signals flags
380380
build_args += [
381381
'-R:+EnableSignalHandling',
382382
'-R:+InstallSegfaultHandler',

sdk/src/org.graalvm.launcher/src/org/graalvm/launcher/AbstractLanguageLauncher.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -48,7 +48,6 @@
4848
import java.util.List;
4949
import java.util.Map;
5050

51-
import org.graalvm.nativeimage.RuntimeOptions;
5251
import org.graalvm.polyglot.Context;
5352
import org.graalvm.polyglot.Engine;
5453
import org.graalvm.polyglot.Language;
@@ -150,12 +149,6 @@ protected final void launch(String[] args) {
150149
* @throws Exception if no launcher constructor has been set.
151150
*/
152151
public static void runLauncher(byte[][] optionVarsArgs, byte[][] args, int argc, long argv, boolean relaunch) throws Exception {
153-
if (isAOT()) {
154-
// enable signal handling for the launcher
155-
RuntimeOptions.set("EnableSignalHandling", true);
156-
RuntimeOptions.set("InstallSegfaultHandler", true);
157-
}
158-
159152
if (LAUNCHER_CTOR == null) {
160153
throw new Exception("Launcher constructor has not been set.");
161154
}

0 commit comments

Comments
 (0)