On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Thu, 8 Sep 2022 08:34:59 GMT, Adam Sotona wrote:
> According to javadoc VarHandle of static field "effectively ignore the
> volatile declaration".
> Volatility of REPL.$Cancel.allStop field is critical for this use case.
VarHandles defines xxxVolatile so it would be feasible but I don't see
On Tue, 6 Sep 2022 09:05:53 GMT, Adam Sotona wrote:
>> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java
>> line 200:
>>
>>> 198: allStop.set(null, true);
>>> 199: } catch (IllegalArgumentException| IllegalAccessException
>>> ex) {
>>> 200
On Wed, 7 Sep 2022 19:48:56 GMT, ExE Boss wrote:
>> Adam Sotona has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Minor formating fixes
>
> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java
> line 51:
>
>> 49:
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Wed, 7 Sep 2022 18:35:37 GMT, Jan Lahoda wrote:
> Not sure what you mean - as far as I can tell, neither the generated class,
> nor the snippets access `LocalExecutionControl.allStop`.
Okay, I see it now. REPL.$Cancel$.allStop is public so there is no issue
accessing it from LEC.invoke.
-
On Wed, 7 Sep 2022 18:22:21 GMT, Alan Bateman wrote:
> Would it be possible to summarize how the loader delegate work in jshell?
> Instrumenting the code to invoke REPL/$Cancel$.stopCheck looks reasonable but
> I can't immediately see how the generated REPL/$Cancel$ has access to
> LocalExecut
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Tue, 6 Sep 2022 08:06:13 GMT, Rémi Forax wrote:
>> Adam Sotona has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - allStop field and stopCheck method moved to synthetic REPL.$Cancel$
>> - Revert "alternative implementation where instru
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all user code to call
> LocalExecutionControl::stopCheck m
On Tue, 6 Sep 2022 08:04:07 GMT, Rémi Forax wrote:
>> Adam Sotona has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - allStop field and stopCheck method moved to synthetic REPL.$Cancel$
>> - Revert "alternative implementation where instru
On Mon, 5 Sep 2022 19:23:30 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all user code to call
> LocalExecutionControl::stopCheck m
On Mon, 5 Sep 2022 15:53:32 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Mon, 5 Sep 2022 15:53:32 GMT, Adam Sotona wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all user code to call
> LocalExecutionControl::stopCheck m
On Mon, 5 Sep 2022 14:42:56 GMT, Adam Sotona wrote:
>> This is the last usage of Thread.stop in the JDK so this change is welcome.
>>
>> The instrumentation to check a flag at jump instrumentation looks
>> reasonable, and works here because the method is public on a public class in
>> an expor
On Mon, 5 Sep 2022 13:18:08 GMT, Alan Bateman wrote:
>> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
>> execution of (long-running or infinite loops) user code in JShell, however
>> Thread::stop is deprecated and planned for removal.
>>
>> Proposed patch instruments
On Mon, 5 Sep 2022 12:39:41 GMT, Adam Sotona wrote:
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all u
On Mon, 5 Sep 2022 12:39:41 GMT, Adam Sotona wrote:
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all u
On Mon, 5 Sep 2022 12:39:41 GMT, Adam Sotona wrote:
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all u
On Mon, 5 Sep 2022 12:39:41 GMT, Adam Sotona wrote:
> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel
> execution of (long-running or infinite loops) user code in JShell, however
> Thread::stop is deprecated and planned for removal.
>
> Proposed patch instruments all u
23 matches
Mail list logo