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

Fix GetThreadState to return correct state for carrier thread #16805

Commits on Mar 2, 2023

  1. Fix GetThreadState to return correct state for carrier threads

    JVMTI GetThreadState returns 0 (invalid state) for carrier threads
    when a virtual thread is mounted over them. 0 indicates that the
    thread has not started but this state is invalid for the carrier
    threads when they have a virtual thread mounted.
    
    Helper function getThreadState should not be given virtual thread
    objects. It should only receive platform thread objects. Instead of
    targetThread->threadObject which can be a virtual thread object, it is
    given targetThread->carrierThreadObject to correctly evaluate the
    state of carrier threads. This change should also be compatible with
    all platform threads since carrierThreadObject is set only once during
    thread creation, and it stays the same until thread termination.
    
    Related: eclipse-openj9#16690
    
    Signed-off-by: Dipak Bagadiya <dipak.bagadiya@ibm.com>
    dipak-bagadiya committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    8134e18 View commit details
    Browse the repository at this point in the history