Skip to content

Commit e7c05df

Browse files
committed
[GR-32154] Set --engine.InstrumentExceptionsAreThrown for RubyLauncher
* Otherwise instrumentation might swallow Thread#kill and Thread#raise exceptions, by printing them instead of propagating them. (cherry picked from commit d90beb1)
1 parent 72b15fb commit e7c05df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/launcher/java/org/truffleruby/launcher/RubyLauncher.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ protected List<String> preprocessArguments(List<String> args, Map<String, String
6868
final String launcher = ProcessProperties.getExecutableName();
6969
polyglotOptions.put(OptionsCatalog.LAUNCHER.getName(), launcher);
7070
}
71+
72+
// Instrumentation should not swallow exceptions, especially exceptions from Truffle safepoints (GR-32154)
73+
polyglotOptions.put("engine.InstrumentExceptionsAreThrown", "true");
74+
// TruffleRuby is never distributed without the GraalVM compiler, so this warning is not necessary
7175
polyglotOptions.put("engine.WarnInterpreterOnly", "false");
7276

7377
config = new CommandLineOptions();

0 commit comments

Comments
 (0)