[crac] RFR: Print better diagnostics for spawning CRIU [v2]

Jan Kratochvil jkratochvil at openjdk.org
Wed Aug 9 22:59:58 UTC 2023

On Wed, 9 Aug 2023 19:40:33 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>>  - print error messages in C++
>>  - Merge branch 'crac' into crac-error
>>  - Print better diagnostics for spawning CRIU.
> src/java.base/unix/native/criuengine/criuengine.cpp line 91:
>> 89:             }
>> 90:         }
>> 91:         retval += '\'';
> It will be surprised to meet these symbols in the args, and IMHO this is overly complicated way to report them

Should it therefore abort when it sees such symbol? Otherwise the problem will not be reproducible from the error message.

> src/java.base/unix/native/criuengine/criuengine.cpp line 109:
>> 107:     free(cwd_s);
>> 108:     return path_from(cwd, rel);
>> 109: }
> The problem with this function as abstraction is that it first calculates CWD, then checks was the argument absolute or relative.

The code was more simple that way and it was straightforward to replace it with C++17 `std::filesystem::path` after [OpenJDK makes the switch to C++17](https://bugs.openjdk.org/browse/JDK-8310260).


PR Review Comment: https://git.openjdk.org/crac/pull/97#discussion_r1289328676
PR Review Comment: https://git.openjdk.org/crac/pull/97#discussion_r1289311008

More information about the crac-dev mailing list