compiler hangs indefinitely trying to sem this winim module
alaviss opened this issue · comments
alaviss commented
Example
#!/bin/sh
git clone https://github.com/khchen/winim.git --no-checkout --filter=tree:0
cd winim
git switch --detach bffaf742b4603d1f675b4558d250d5bfeb8b6630
nim c --compileOnly winim/inc/winnls.nim
Actual Output
.............................................................
Then the compiler spin at 100% CPU usage here.
Additional Information
- Found this while trying to hook up nimskull CI for nim-sys
- Stacktrace when tested with
nim_dbg
Traceback (most recent call last)
nim.nim(154) nim
nim.nim(89) handleCmdLine
main.nim(539) mainCommand
main.nim(491) compileToBackend
main.nim(214) commandCompileToC
modules.nim(212) compileProject
modules.nim(128) compileModule
passes.nim(284) processModule
passes.nim(102) processTopLevelStmt
sem.nim(950) myProcess
sem.nim(868) semStmtAndGenerateGenerics nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semstmts.nim(3364) semStmt
semexprs.nim(1441) semExprNoType
semexprs.nim(3843) semExpr nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semstmts.nim(2993) semRoutineDef nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semstmts.nim(2167) semProcAnnotation
semstmts.nim(571) semAnnotation
semstmts.nim(562) tryMacroPragma
semexprs.nim(1190) afterCallActions
sem.nim(788) semMacroExpr nkCall 775798 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 52)
sem.nim(728) semAfterMacroCall nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semexprs.nim(3843) semExpr nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semstmts.nim(3025) semRoutineDef nkProcDef 775774 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 0)
semstmts.nim(2776) semProc
semstmts.nim(2554) semProcAux
semstmts.nim(2477) semRoutineParams
semstmts.nim(2100) semParamList
semtypes.nim(1614) semProcTypeNode
semtypes.nim(2237) semTypeNode nkIdent 775781 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 43)
semtypes.nim(595) semTypeIdent nkIdent 775781 /home/leorize/documents/sources/winim/winim/inc/winnls.nim(759, 43)
ast_query.nim(443) isError
SIGINT: Interrupted by Ctrl-C.
Saem Ghani commented
This issue was fixed but not auto closed.
See PR #1156