On Wed, 9 Nov 2022 09:32:42 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Forgot a null check.
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 557:
>
>> 555: JvmtiEnvBase::new_jthreadGroupArray(int length, objArrayHandle groups) {
>> 556: if (length == 0) {
>> 557: return NULL;
>
> I do not think returning NULL is allowed for JVMTI `GetThreadGroupChildren()`.
> Please, see:
> [GetThreadGroupChildren](https://docs.oracle.com/en/java/javase/19/docs/specs/jvmti.html#GetThreadGroupChildren)
I don't think this has changed. Right now, if there are no child subgroups then
*group_count_ptr will be 0 and *groups_ptr will be NULL as there is no memory
to deallocate. JVMTI Deallocate is specified to do nothing when called with
NULL.
-------------
PR: https://git.openjdk.org/jdk/pull/11033