diff --git a/meringue-jazzer-extension/src/main/java/edu/neu/ccs/prl/meringue/JazzerFramework.java b/meringue-jazzer-extension/src/main/java/edu/neu/ccs/prl/meringue/JazzerFramework.java index ba2f073..1fb8c8d 100644 --- a/meringue-jazzer-extension/src/main/java/edu/neu/ccs/prl/meringue/JazzerFramework.java +++ b/meringue-jazzer-extension/src/main/java/edu/neu/ccs/prl/meringue/JazzerFramework.java @@ -8,6 +8,7 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.*; +import java.util.stream.Collectors; public final class JazzerFramework implements FuzzFramework { private File outputDir; @@ -117,7 +118,7 @@ private List createCommand(CampaignConfiguration config, Properties fram command.add("--keep_going=" + Integer.MAX_VALUE); command.add("--reproducer_path=" + reproducerDir.getAbsolutePath()); if (!config.getJavaOptions().isEmpty()) { - command.add("--jvm_args=" + String.join(File.pathSeparator, config.getJavaOptions())); + command.add("--jvm_args=" + String.join(File.pathSeparator, escapeJavaOptions(config.getJavaOptions()))); } String argLine = frameworkArguments.getProperty("argLine"); if (argLine != null && !argLine.isEmpty()) { @@ -132,6 +133,12 @@ private List createCommand(CampaignConfiguration config, Properties fram return command; } + private static List escapeJavaOptions(List javaOptions) { + return javaOptions.stream() + .map(s -> s.replace(":", "\\:")) + .collect(Collectors.toList()); + } + private static File getJazzerResource(File outputDir, String resourceName) throws IOException { String resourcePathPrefix; if (SystemUtils.IS_OS_MAC) {