move oop safety check from SharedRuntime::get_java_tid() to JavaThread::threadObj()

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 19
    • Affects Version/s: 17, 19
    • Component/s: hotspot
    • b30

        In the code review for:
            JDK-8288139 JavaThread touches oop after GC barrier is detached

        this topic came up:

        https://github.com/openjdk/jdk19/pull/21#discussion_r898495754

        Here's [~dholmes]' comment:

        > I think the oop-touching-safety check should be done in
        > threadObj() itself so that all callers are protected.

        During the review, I agreed that threadObj() was a better placement,
        but I didn't want to make that change yet because I thought it might
        result in more issues that would need to be investigated. JDK-8288139
        is about the failure due to the call to SharedRuntime::get_java_tid() and
        I wanted to focus my fix on that exact failure mode.

        This bug is for investigating moving the oop safety check from
        SharedRuntime::get_java_tid() to JavaThread::threadObj().

              Assignee:
              Daniel Daugherty
              Reporter:
              Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: