RFR: 8338851: Hoist os::Posix::realpath() to os::realpath() and implement on Windows [v4]
David Holmes
dholmes at openjdk.org
Thu Sep 12 01:02:08 UTC 2024
On Wed, 11 Sep 2024 19:17:19 GMT, Simon Tooke <stooke at openjdk.org> wrote:
>> This PR changes the status of realpath() from a Posix-specific API to a globally available API, i.e. adding it to the "Hotspot Porting API". Code would refer to os::realpath() instead of os::Posix::realpath().
>>
>> This requires the addition of a stub routine in os_posix.cpp and a Windows implementation of realpath(), using Windows _fullpath().
>>
>> This PR depends on #20597 in that it removes the need for one #ifdef in that PR. Because of that, this PR will be modified when and if #20597 is integrated.
>>
>> Please note that guidelines for doing this appear in src/hotspot/share/runtime/os.hpp
>
> Simon Tooke has updated the pull request incrementally with one additional commit since the last revision:
>
> properly test for buffer too small for path
Changes requested by dholmes (Reviewer).
src/hotspot/os/posix/os_posix.cpp line 990:
> 988: }
> 989:
> 990:
Spurious extra line ?
src/hotspot/os/windows/os_windows.cpp line 5337:
> 5335: ALLOW_C_FUNCTION(::free, ::free(p);) // *not* os::free
> 5336: }
> 5337: }
You have forgotten to return `result`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20683#pullrequestreview-2299014792
PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1755920995
PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1755930028
More information about the serviceability-dev
mailing list