Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite Loop When Inlining Function Items (II) #2033

Open
ChristianGruen opened this issue Aug 14, 2021 · 0 comments
Open

Infinite Loop When Inlining Function Items (II) #2033

ChristianGruen opened this issue Aug 14, 2021 · 0 comments
Labels

Comments

@ChristianGruen
Copy link
Member

ChristianGruen commented Aug 14, 2021

Query

let $p := function($c, $q) {
  $c/* ! $q(?, $q)(.)
}
return $p((), $p)

(: earlier version :)
let $p := function($c, $q) {
  for-each($c/*, $q(?, $q))
}
return $p((), $p)

Stack Trace

java.lang.StackOverflowError
        at java.base/java.lang.invoke.DirectMethodHandle.allocateInstance(DirectMethodHandle.java:521)
        at org.basex.query.expr.path.Step.toString(Step.java:404)
        at org.basex.query.QueryString.token(QueryString.java:39)
        ...
        at org.basex.query.expr.ExprInfo.toString(ExprInfo.java:56)
        at org.basex.query.CompileContext.lambda$0(CompileContext.java:306)
        at org.basex.query.QueryInfo.compInfo(QueryInfo.java:66)
        at org.basex.query.CompileContext.info(CompileContext.java:110)
        at org.basex.query.CompileContext.replaceWith(CompileContext.java:300)
        at org.basex.query.CompileContext.replaceWith(CompileContext.java:286)
        at org.basex.query.CompileContext.preEval(CompileContext.java:256)
        at org.basex.query.func.PartFunc.optimize(PartFunc.java:56)
        at org.basex.query.expr.Arr.inline(Arr.java:74)
        at org.basex.query.InlineContext.inline(InlineContext.java:120)
        at org.basex.query.InlineContext.inline(InlineContext.java:104)
        at org.basex.query.expr.Arr.inline(Arr.java:74)
        at org.basex.query.expr.SimpleMap.inline(SimpleMap.java:484)
        at org.basex.query.InlineContext.inlineOrNull(InlineContext.java:94)
        at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:980)
        at org.basex.query.expr.gflwor.GFLWOR.inlineForLet(GFLWOR.java:363)
        at org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:108)
        at org.basex.query.value.item.FuncItem.inline(FuncItem.java:209)
        at org.basex.query.func.DynFuncCall.optimize(DynFuncCall.java:100)
        at org.basex.query.value.item.FuncItem.inline(FuncItem.java:207)
        at org.basex.query.func.DynFuncCall.optimize(DynFuncCall.java:100)
        at org.basex.query.expr.Arr.inline(Arr.java:74)
        at org.basex.query.expr.SimpleMap.inline(SimpleMap.java:484)
        at org.basex.query.InlineContext.inlineOrNull(InlineContext.java:94)
        at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:980)
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant