RFR: 8361873: [GCC static analyzer] exec_md.c forkedChildProcess potential double 'close' of file descriptor '3' [v2]

Chris Plummer cjplummer at openjdk.org
Mon Jul 28 16:01:56 UTC 2025


On Sun, 27 Jul 2025 05:56:51 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Chris Plummer 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 two additional commits since the last revision:
>> 
>>  - Merge branch 'master' into 8361873_jdwp_close_fd
>>    Merge
>>  - fix gcc warning about double close()
>
> src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 82:
> 
>> 80:      * descriptors afresh.
>> 81:      *
>> 82:      * WARNING: We are not allowed to fail until after these two closes are
> 
> Hello Chris, would it be better to word this as "We are not allowed to return from this function until after ...."?

The issue is returning with a failure, not simply returning early, although it should only ever return early if there is a failure. I can change "not allowed to fail" with "not allowed to return with a failure"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26487#discussion_r2237077081


More information about the serviceability-dev mailing list