RFR: JDK-8313691: use close after failing os::fdopen in vmError and ciEnv [v2]

Tobias Hartmann thartmann at openjdk.org
Fri Aug 4 12:03:32 UTC 2023


On Fri, 4 Aug 2023 07:02:02 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> In vmError.cpp we use os::fdopen and in case this is successful pass the returned file pointer to a fileStream constructor.
>> The fileStream object calls fclose on our file pointer  in destruction (and this closes also the underlying file descriptor fd).
>> 
>> However in case of failing os::fdopen we do not create (and later destruct)  a fileStream object so direct call to close might be needed. I also adjusted a comment to make it  even clearer that the fileStream object fcloses the file pointer on the destructor.
>
> Matthias Baesken 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:
> 
>  - Adjust ciEnv.cpp and comment
>  - Merge remote-tracking branch 'origin/master' into JDK-8313691
>  - JDK-8313691

Looks good to me. I'll run some testing and report back once it passed.

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15139#pullrequestreview-1562733954


More information about the hotspot-dev mailing list