Saxon-HE 9.8.0-3 Tail Calls
Added by Vladimir Nesterovsky over 7 years ago
We're getting an error like this with Saxon-HE 9.8.0-3:
err:SXLM0001: Too many nested function calls. May be due to infinite recursion.
With version 9.7 it was working perfectly. My guess that it's somehow related to tail call optimization. Is anything changed in this regard in new version?
We still are to build a simple test case...
Replies (6)
Please register to reply
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Michael Kay over 7 years ago
There are no conscious changes in the code for tail-call recursion but it's sensitive to other optimizations that may have changed, and may change the expression tree in a way that means we no longer recognize the tail call. We'll need to see a specific test case. (If you can't build a simple test case, a complex one will do, so long as we can run it...)
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Vladimir Nesterovsky over 7 years ago
As simple as this tail call template with any input:
Works perfectly with Saxon-HE-9.7.0-18, and craches with "Too many nested template or function calls. The stylesheet may be looping." in Saxon-HE-9.8.0-3.
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Michael Kay over 7 years ago
Thanks, please track this here:
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Vladimir Nesterovsky over 7 years ago
Is it possible in your development cycle to implement maven snapshot version? This way you would get more prompt feed back. As present we run our code base on each new version, and then rollback to the old one with long wait for a version tick for.
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Michael Kay over 7 years ago
I understand the benefits of this, but
(a) if we ran our full set of tests on each such snapshot, it could add a significant amount of testing effort
(b) if we didn't run our full set of tests on each such snapshot, it could add a significant number of bugs and therefore support effort.
RE: Saxon-HE 9.8.0-3 Tail Calls - Added by Michael Kay over 7 years ago
(Subsequent events illustrated this point rather well: after committing another patch for an unrelated bug I ran the XSLT 3.0 test suite in export/import mode where each compiled stylesheet is written to an SEF file and then imported before being executed; and this test showed that the patch for this problem was incomplete. Running the full test suite in this way is something we do before a maintenance release, but it is not something we do on every commit.)
Please register to reply