Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JDK21] Add support for JVMTI StopThread
Previously, StopThread returned JVMTI_ERROR_UNSUPPORTED_OPERATION for a virtual thread. In JDK21, StopThread includes support for virtual threads as per the JVMTI specification: - Error if a virtual thread is not suspended and not the current thread. - Error if a virtual thread is unomunted since it won't be able to throw an asynchronous exception from the current frame. Related: - #17717 - #17718 Also, StopThread should not clear the J9_PUBLIC_FLAGS_HALT_THREAD_JAVA_SUSPEND flag. This behaviour is not documented in the JVMTI specification. It causes incorrect behaviour for ResumeThread when the following sequence of JVMTI functions are invoked: SuspendThread -> StopThread -> ResumeThread. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information