Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288387

GetLocalXXX/SetLocalXXX spec should require suspending target thread

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 20
    • 19, repo-loom
    • hotspot
    • b20

      Initial description from Alan:
       “The SetLocalXXX functions may be used to set the value of a local variable in the topmost frame of a virtual thread suspended at a breakpoint or single step event. An implementation may support setting locals in other cases.”
       We want to re-visit this wording and/or require that the virtual thread be suspended.
       Also, the spec of all GetLocalXXX/SetLocalXXX should require the target thread be suspended or current even if the thread is non-virtual.

      Updated description:
      The implementation of SetLocalXXX for virtual threads has just been fixed with JDK-8286580 to follow the JVMTI spec.
      However, it was identified that the GetLocalXXX/SetLocalXXX function should require suspending the target thread. All these functions have a stack depth parameter. There only way to ensure the execution state of target thread matches the stack depth expectations is to deal with current or suspended target thread. This needs a CSR and other compatibility checks.

            sspitsyn Serguei Spitsyn
            sspitsyn Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: