RFR: 8049695: nsk/jdb/options/connect/connect003 fails with "Launched jdb could not attach to debuggee during 300000 milliseconds"
David Holmes
david.holmes at oracle.com
Tue Mar 20 01:10:48 UTC 2018
Hi Alex,
On 20/03/2018 10:28 AM, Alex Menkov wrote:
> Hi guys,
>
> please re-review the fix.
I still have an unanswered question about where the max of 49 is
enforced. I see it for the "address" but not names in general. ??
> Reg.test is added the the issue.
I don't quite follow the test. I see you try to set the name with a
value that is too long, and if that doesn't cause an overflow and we
don't crash that is good. But I'd expect you to read back the name and
check it matches the truncated name with 49 characters.
Thanks,
David
> webrev: http://cr.openjdk.java.net/~amenkov/shmem_long_name/webrev_open.04/
>
> --alex
>
> On 03/13/2018 16:14, Alex Menkov wrote:
>> Hi all,
>>
>> Please review a small fix for
>> https://bugs.openjdk.java.net/browse/JDK-8049695
>> webrev: http://cr.openjdk.java.net/~amenkov/shmem_long_name/webrev_open/
>>
>> Root cause of the issue is jbd hungs as a result of the buffer overflow.
>>
>> In the beginning of the shmemBase.c:
>>
>> #define MAX_IPC_PREFIX 50 /* user-specified or generated name for */
>> /* shared memory seg and prefix for other
>> IPC */
>> #define MAX_IPC_SUFFIX 25 /* suffix to shmem name for other IPC
>> names */
>> #define MAX_IPC_NAME (MAX_IPC_PREFIX + MAX_IPC_SUFFIX)
>>
>> buffer (char prefix[]) in function createStream is used to generate
>> base name for mutex/events, so MAX_IPC_PREFIX is not big enough.
>>
>> --alex
More information about the serviceability-dev
mailing list