Integrated: 8355323: JShell LocalExecutionControl should add stopCheck() at method entry

Archie Cobbs acobbs at openjdk.org
Fri May 23 13:37:03 UTC 2025


On Thu, 24 Apr 2025 20:35:28 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: d0402dda
Author:    Archie Cobbs <acobbs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d0402ddad72f8ac251d963d57cd6710d6aa655d1
Stats:     257 lines in 4 files changed: 199 ins; 54 del; 4 mod

8355323: JShell LocalExecutionControl should add stopCheck() at method entry

Reviewed-by: liach, jlahoda

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

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


More information about the kulla-dev mailing list