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

The ropes break ORC-booting compiler #19555

Closed
ringabout opened this issue Feb 23, 2022 · 1 comment
Closed

The ropes break ORC-booting compiler #19555

ringabout opened this issue Feb 23, 2022 · 1 comment

Comments

@ringabout
Copy link
Member

ringabout commented Feb 23, 2022

import std/strutils

const translationTable = splitLines(staticRead"unidecode/unidecode.dat")

var result = ""
var c = 1
add(result, translationTable[c - 1])

echo result
C:\Users\blue\Desktop\work\Nim\compiler\nim.nim(138) nim
C:\Users\blue\Desktop\work\Nim\compiler\nim.nim(94) handleCmdLine
C:\Users\blue\Desktop\work\Nim\compiler\main.nim(275) mainCommand
C:\Users\blue\Desktop\work\Nim\compiler\main.nim(245) compileToBackend
C:\Users\blue\Desktop\work\Nim\compiler\main.nim(101) commandCompileToC
C:\Users\blue\Desktop\work\Nim\compiler\modules.nim(178) compileProject
C:\Users\blue\Desktop\work\Nim\compiler\modules.nim(98) compileModule
C:\Users\blue\Desktop\work\Nim\compiler\passes.nim(180) processModule
C:\Users\blue\Desktop\work\Nim\compiler\passes.nim(73) processTopLevelStmt
C:\Users\blue\Desktop\work\Nim\compiler\cgen.nim(1954) myProcess
C:\Users\blue\Desktop\work\Nim\compiler\cgen.nim(1948) genTopLevelStmt
C:\Users\blue\Desktop\work\Nim\compiler\cgen.nim(1018) genProcBody
C:\Users\blue\Desktop\work\Nim\compiler\ccgstmts.nim(1602) genStmts
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2870) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2588) genStmtList
C:\Users\blue\Desktop\work\Nim\compiler\ccgstmts.nim(1602) genStmts
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2870) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2599) genStmtList
C:\Users\blue\Desktop\work\Nim\compiler\ccgstmts.nim(1602) genStmts
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2870) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2599) genStmtList
C:\Users\blue\Desktop\work\Nim\compiler\ccgstmts.nim(1602) genStmts
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2935) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2871) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgstmts.nim(447) genIf
C:\Users\blue\Desktop\work\Nim\compiler\cgen.nim(652) initLocExprSingleUse
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2838) expr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2281) genMagicExpr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(699) unaryArith
C:\Users\blue\Desktop\work\Nim\compiler\cgen.nim(639) initLocExpr
C:\Users\blue\Desktop\work\Nim\compiler\ccgexprs.nim(2838) expr
(474 calls omitted) ...
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(172) nimDestroyAndDispose
C:\Users\blue\Desktop\work\Nim\lib\system\arc.nim(63) nimDecRefIsLast
C:\Users\blue\Desktop\work\Nim\lib\system\arithmetics.nim -%
Error: call depth limit reached in a debug build (600 function calls). You can change it with -d:nimCallDepthLimit=<int> but really try to avoid deep recursions instead.

The destructor of rope is called recursively and excess the maximum call depth.

@ringabout
Copy link
Member Author

ringabout commented Oct 6, 2022

Now it is no longer crash after #20433 was merged but it is much slower in compilation speed than refc booting compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant