On Wed, 21 Oct 2026 20:12:23 GMT, Chris Plummer <[email protected]> wrote:

>> Yasumasa Suenaga has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   update condition
>
> src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c line 142:
> 
>> 140:        if (ph->core == NULL) {
>> 141:          close(lib->fd);
>> 142:        }
> 
> Combine with next line.

Fixed.

> src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c line 143:
> 
>> 141:          close(lib->fd);
>> 142:        }
>> 143:        else if (lib->fd != ph->core->exec_fd) {
> 
> During a core detach you might use ph->core after freeing it.  core_release() 
> frees ph->core before calling destroy_lib_info(), yet here you are 
> de-referencing through ph->core.

Good catch. I re-ordered function calls in `Prelease()`. I believe it does not 
occur any side effects.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33375#discussion_r4343913237
PR Review Comment: https://git.openjdk.org/jdk/pull/33375#discussion_r4343919798

Reply via email to