On Wed, 29 Nov 2023 23:06:10 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:
> A belated thumbs up. Sorry I didn't get back to this review before the fix > was integrated. Still thanks for reviewing the change, @dcubed-ojdk. > > I found just a nit comment that could be more clear. The particular issue occurred when `JavaThread::allocate_threadObj` was allocating and initializing the Thread instance. When the allocation of the Thread object triggered sampling, it could create a `JvmtiThreadState` with null thread oop with the bug. It seems "is being allocated" describes the issue more accurately. > src/hotspot/share/prims/jvmtiExport.cpp line 3143: > >> 3141: >> 3142: // If the current thread is attaching from native and its Java >> thread object >> 3143: // is being allocated, things are not ready for allocation sampling. > > nit - typo: s/is being allocated/has not been allocated/ Please see other comment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16642#issuecomment-1834148374 PR Review Comment: https://git.openjdk.org/jdk/pull/16642#discussion_r1410956027