JDK-8242425 introduces to migrate to thread local handshake from VM operation for GetOwnedMonitorInfo, GetOwnedMonitorStackDepthInfo, and GetCurrentContendedMonitor JVMTI functions. However it lacks of validations for thread state and thread oop of the target.
They were validated when it was performed in VM operations. It should be validated even if they are performed in handshakes.
JDK-8242425JVMTI monitor operations should use Thread-Local Handshakes