On Fri, 10 Jul 2026 07:37:06 GMT, Kevin Walls <[email protected]> wrote:
>> src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c line 80:
>>
>>> 78: addr.sun_family = AF_UNIX;
>>> 79: if (strlen(p) >= sizeof(addr.sun_path)) {
>>> 80: JNU_ThrowIOException(env, "Socket file path too long");
>>
>> Nit:
>> The exception is thrown without releasing the string `p`.
>> This does not match the comment at lines 95-97.
>
> I read this as creating the exception, then falling through to code below
> which may callReleaseStringPlatformChars.
> err is still 0 so no other exception will be thrown.
Agreed, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3557648125