RFR: 8350869: os::stat doesn't follow symlinks on Windows [v3]
David Holmes
dholmes at openjdk.org
Fri May 16 06:18:57 UTC 2025
On Thu, 15 May 2025 14:08:54 GMT, Anton Artemov <duke at openjdk.org> wrote:
>> I verified, one does not have to set `errno` here, as in both use cases of `is_symbolic_link()` the further code in `os::stat()` and `os::open()` checks a return value of a corresponding method and returns -1 in case of a problem. By this one knows that something went wrong.
>>
>> In this particular place one only needs to close a search handle by calling `FindClose()`.
>
> The only explicit way how to notify about the error I found is like this:
> `log_info(os)("CreateFileMapping() failed: GetLastError->%ld.", GetLastError());`
> Then one would not presumably need to set `errno`.
>
> The question is rather if we want to see this message or just rely on the existing logic.
A log_debug to report any error would not be a bad thing IMO.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25233#discussion_r2092397095
More information about the hotspot-runtime-dev
mailing list