RFR: 8352489: Relax jspawnhelper version checks to informative

Severin Gehwolf sgehwolf at openjdk.org
Thu Mar 20 11:06:08 UTC 2025


On Thu, 20 Mar 2025 09:52:02 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the bug for rationale. 
> 
> This goal for this improvement is to be easily backportable, so we can catch up with update releases. As such, it does a few borderline-trivial changes, and _does not_ change the jspawnhelper protocol. So the overwrite of `jspawnhelper` with this new version would be "compatible" in a very weak sense of the word.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `java/lang/ProcessBuilder`

src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 160:

> 158: 
> 159:     if (strcmp(argv[1], VERSION_STRING) != 0) {
> 160:         fprintf(stdout, "Incorrect Java version: %s\n", argv[1]);

Don't you want to keep the comparison and print the warning if the versions don't match?


if (strcmp(argv[1], VERSION_STRING) != 0) {
    fprintf(stdout, "Warning: Version mismatch: %s != %s\n", argv[1], VERSION_STRING);
}

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24127#discussion_r2005308923


More information about the core-libs-dev mailing list