Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]
On Wed, 18 May 2022 07:40:43 GMT, Thomas Stuefe wrote: >> src/java.base/share/native/libjli/java.c line 1631: >> >>> 1629: const char *arg = jargv[i]; >>> 1630: if (arg[0] == '-' && arg[1] == 'J') { >>> 1631: assert(arg[2] != '\0' && "Invalid JAVA_ARGS or >>> EXTRA_JAVA_ARGS defined by build"); >> >> Interesting trick. > > Since we pass NDEBUG, this assert is disabled in release builds. This is the > supposed behavior, right? That we don't do anything on release builds? Right - that is what I would expect from an assert. - PR: https://git.openjdk.java.net/jdk/pull/8694
Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]
On Wed, 18 May 2022 06:12:41 GMT, David Holmes wrote: >> Yasumasa Suenaga has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commits since the last revision: >> >> - Use assert() to check jargv >> - Merge remote-tracking branch 'upstream/master' into JDK-8286694 >> - 8286694: Incorrect argument processing in java launcher > > src/java.base/share/native/libjli/java.c line 1631: > >> 1629: const char *arg = jargv[i]; >> 1630: if (arg[0] == '-' && arg[1] == 'J') { >> 1631: assert(arg[2] != '\0' && "Invalid JAVA_ARGS or >> EXTRA_JAVA_ARGS defined by build"); > > Interesting trick. Since we pass NDEBUG, this assert is disabled in release builds. This is the supposed behavior, right? That we don't do anything on release builds? - PR: https://git.openjdk.java.net/jdk/pull/8694
Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]
On Tue, 17 May 2022 13:55:43 GMT, Yasumasa Suenaga wrote: >> GCC 12 reports as following: > > Yasumasa Suenaga has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains three additional > commits since the last revision: > > - Use assert() to check jargv > - Merge remote-tracking branch 'upstream/master' into JDK-8286694 > - 8286694: Incorrect argument processing in java launcher Looks fine to me. Thanks. Sorry I see what you mean, it is just an `assert(cond)` not `assert(cond, message)`, but that is fine. src/java.base/share/native/libjli/java.c line 1631: > 1629: const char *arg = jargv[i]; > 1630: if (arg[0] == '-' && arg[1] == 'J') { > 1631: assert(arg[2] != '\0' && "Invalid JAVA_ARGS or > EXTRA_JAVA_ARGS defined by build"); Interesting trick. - Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8694
Re: RFR: 8286694: Incorrect argument processing in java launcher [v2]
> GCC 12 reports as following: Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Use assert() to check jargv - Merge remote-tracking branch 'upstream/master' into JDK-8286694 - 8286694: Incorrect argument processing in java launcher - Changes: - all: https://git.openjdk.java.net/jdk/pull/8694/files - new: https://git.openjdk.java.net/jdk/pull/8694/files/fbde50b2..339dc135 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8694=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8694=00-01 Stats: 6334 lines in 527 files changed: 3166 ins; 1506 del; 1662 mod Patch: https://git.openjdk.java.net/jdk/pull/8694.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8694/head:pull/8694 PR: https://git.openjdk.java.net/jdk/pull/8694