[
https://issues.apache.org/jira/browse/LUCENE-9109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17003263#comment-17003263
]
ASF subversion and git services commented on LUCENE-9109:
---------------------------------------------------------
Commit 65611f6d662ced3acaea2bd6fa8c15404b28a3bf in lucene-solr's branch
refs/heads/gradle-master from Uwe Schindler
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=65611f6 ]
LUCENE-9109: Use stack walker to implement TestSecurityManager's detection of
JVM exit (#1114)
Use stack walker (Java 11 on master only) to implement TestSecurityManager's
detection of test JVM exit
> Use Java 9+ StackWalker to implement TestSecurityManager's detection of JVM
> exit
> --------------------------------------------------------------------------------
>
> Key: LUCENE-9109
> URL: https://issues.apache.org/jira/browse/LUCENE-9109
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/test-framework
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Priority: Major
> Fix For: master (9.0)
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> This is just a small improvement in Lucene/Solr master (Java 11) to detect
> exit of JVM in our test framework. There are other places in Lucene that use
> ineffective ways to inspect the stack trace.
> This one optimizes the implementation of
> TestSecurityManager#checkExit(status) to disallow all JVM exits outside of
> the official test runner by using StackWalker. In addition this needs no
> additional permissions, because we do not instruct StackWalker to fetch all
> crazy stuff like Class instances of stack elements.
> The way how this works is: Walk through stack trace:
> - skip all internal frames (those which come before the actual exit call)
> - skip all frmes with the actual exit call
> - limit to one more frame (the method calling System.exit())
> - check if that remaining frame is on our whitelist
> This can only be commited to master (9.0), as it requires Java 9.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]