Bug Report: arguments supplied to restore are split with whitespace

孙译喆 yizhe at pku.edu.cn
Wed Aug 2 07:34:02 UTC 2023

Calling `java -XX:CRaCRestore Foo arg1` when there is whitespace in `arg1` causes `arg1` to be split into multiple arguments. I don't think this is intentional.

Here's a demonstation.


// mypack/Foo.java

package mypack;

import jdk.crac.Core;
import java.util.Arrays;

public class Foo {
    public static void main(String[] args) throws Exception {

class Bar {
    public static void main(String[] args) {


Step 1: create a checkpoint with `java -XX:CRaCCheckpointTo=foo_checkpoint mypack.Foo`

Step 2: restore the checkpoint with `java -XX:CRaCRestoreFrom=foo_checkpoint mypack.Bar 'Hello World'`

Expected output: ["Hello World"]

Actual output: ["Hello", "World"]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/crac-dev/attachments/20230802/b2b56786/attachment-0001.htm>

More information about the crac-dev mailing list