Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289610 Degrade Thread.stop
  3. JDK-8289613

Drop use of Thread.stop in jshell

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 20
    • None
    • tools
    • None
    • b15

      jshell needs to drop its usage of Thread.stop so that this method can be degraded to throw UOE unconditionally. The usage in jshell seems to be there to deal with looping threads and dealing with the user pressing "control-C". Alternatives to Thread.stop should be explored, maybe it is possible to start a new debuggee VM, maybe the compiler could generate code that checks a flag or interrupt status at back branches, maybe it could use an agent that injects a check. A short term fix may be be to use JDI ThreadReference::stop as this method will continue to work for debuggers.

            asotona Adam Sotona
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: