On Wed, 9 Nov 2022 09:49:10 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> 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. Alan, you are right. This check existed before. ------------- PR: https://git.openjdk.org/jdk/pull/11033