RFR: 8358799: Refactor os::jvm_path() [v2]

SendaoYan syan at openjdk.org
Tue Jun 10 00:41:37 UTC 2025


On Mon, 9 Jun 2025 19:01:57 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> The linux, bsd, and aix versions of os::jvm_path() are very similar and can be combined into one in os_posix.cpp.
>> 
>> Passed tiers 1 - 3 tests.
>> However, tests were not run on the aix platform since it is not one of the Oracle supported platforms.
>
> Calvin Cheung 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:
> 
>  - review comments from @dholmes-ora and @jdksjolen
>  - Merge branch 'master' into 8358799-refactor-jvm-path
>  - 8358799: Refactor os::jvm_path()

src/hotspot/os/posix/os_posix.cpp line 1071:

> 1069:     assert(false, "must use a large-enough buffer");
> 1070:     buf[0] = '\0';
> 1071:     return;

Do we need release the memory of `buf` before return, such like


free(buf);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25675#discussion_r2136714406


More information about the hotspot-runtime-dev mailing list