On Tue, 9 Jun 2026 06:05:08 GMT, David Holmes <[email protected]> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Apply suggestions from code review
>>   
>>   Co-authored-by: David Holmes 
>> <[email protected]>
>
> src/hotspot/os/linux/os_linux.cpp line 1565:
> 
>> 1563:       AltTempDir = nullptr;
>> 1564:     } else if (!is_writeable_directory(AltTempDir)) {
>> 1565:       log_warning(os)("Error: AltTempDir is ignored because it is not 
>> present or writable");
> 
> Ditto: warning or error?

Made it say "Warning:"

> src/hotspot/os/linux/os_linux.cpp line 1568:
> 
>> 1566:       AltTempDir = nullptr;
>> 1567:     }
>> 1568:   }
> 
> Suggestion:
> 
>   } else {
>     AltTempDir = nullptr;
>   }
> 
> That way we don't need to check AltTempDir[0] again at line 1573 - if it is 
> non-null then it is valid.

good suggestion.

> src/hotspot/os/posix/attachListener_posix.cpp line 354:
> 
>> 352:     log_warning(attach)("Failed to attach using temporary file %s", fn);
>> 353:     return;
>> 354:   }
> 
> Is runtime truncation actually possible?

This is wrong. It should check if the return is an error -1, which should be 
returned if truncated.  I'll add a test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3387964678
PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3387991484
PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3388074774

Reply via email to