jpountz commented on issue #1444: URL: https://github.com/apache/lucene-solr/pull/1444#issuecomment-618396405
I managed to defeat the new validation logic with this test: ``` public void testCoRecursion42() throws Exception { SimpleBindings bindings = new SimpleBindings(); bindings.add("cycle2", JavascriptCompiler.compile("cycle1")); bindings.add("cycle1", JavascriptCompiler.compile("cycle0")); bindings.add("cycle0", JavascriptCompiler.compile("cycle1")); IllegalArgumentException expected = expectThrows(IllegalArgumentException.class, () -> { bindings.validate(); }); assertTrue(expected.getMessage().contains("Cycle detected")); } ``` It depends on HashMap iteration order, so it might not reproduce for you, but the issue is that `cycle2` gets validated first. And as you recursively create expressions for bindings for `cycle2`, there is an infinite recursive loop, but it only includes `cycle0` and `cycle1` so we might need to track the names of the expressions in a set as we recursively resolve bindings to catch such cases too? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org