RFR: 8355323: JShell LocalExecutionControl should add stopCheck() at method entry [v2]

Archie Cobbs acobbs at openjdk.org
Thu Apr 24 21:53:17 UTC 2025


> This PR addresses [JDK-8355323](https://bugs.openjdk.org/browse/JDK-8355323), which inserts a "stop check" at the start of each method when JShell is running in local execution mode. This augments the existing stop checks that are added at each backward branch, which, while helpful, do not guarantee the snippet thread will notice a stop request in a bounded length of time, because a snippet could be executing some recursive method(s) that have no backward branches (an example is given in the new regression test). This fix closes that loophole.
> 
> Side notes:
> * The existing `StopExecutionTest` unit test was split/refactored to create an `AbstractStopExecutionTest` superclass which could be reused by the new `LocalStopExecutionTest`.
> * There are three disabled tests in `StopExecutionTest` that seem to be working now and maybe could be re-enabled.

Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:

  Refactoring based on review.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24859/files
  - new: https://git.openjdk.org/jdk/pull/24859/files/abda3224..1eae6ac3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24859&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24859&range=00-01

  Stats: 46 lines in 1 file changed: 28 ins; 16 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24859.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24859/head:pull/24859

PR: https://git.openjdk.org/jdk/pull/24859


More information about the kulla-dev mailing list