Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JDK21] Add support for JVMTI StopThread #17806

Merged

Commits on Jul 17, 2023

  1. [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:
    - eclipse-openj9#17717
    - eclipse-openj9#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>
    babsingh committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    a9f1c91 View commit details
    Browse the repository at this point in the history