【发布时间】:2022-06-24 04:48:50
【问题描述】:
我编写了一个在某些 JavaScript 引擎上崩溃的 Kotlin/JS 程序。
它在 GraalVM 上像这样崩溃:
RangeError: Maximum call stack size exceeded
at <js> 839(myprogram.js:394:1174923-1174934)
at <js> e(myprogram.js:394:1175309-1175342)
at <js> 724(myprogram.js:394:1174990-1174995)
at <js> e(myprogram.js:394:1175309-1175342)
at <js> :anonymous(myprogram.js:394:1175222-1175358)
at <js> :program(myprogram.js:394:13041-1175382)
at org.graalvm.polyglot.Context.eval(Context.java:345)
在 Duktape 上是这样失败的:
com.squareup.duktape.DuktapeException: RangeError: compiler recursion limit (line 1)
at com.squareup.duktape.Duktape.evaluate(Native Method)
at com.squareup.duktape.Duktape.evaluate(Duktape.java:60)
此崩溃是从 Kotlin 1.4.10 升级到 1.6.21 时引入的。
【问题讨论】: