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

nim check SIGSEGV (causing nimsuggest to fail too) #10547

Closed
timotheecour opened this issue Feb 4, 2019 · 0 comments
Closed

nim check SIGSEGV (causing nimsuggest to fail too) #10547

timotheecour opened this issue Feb 4, 2019 · 0 comments

Comments

@timotheecour
Copy link
Member

invalid code that should not crash nim check (crashes are bad because it crashes nimsuggest; it's root cause of nim-lang/nimsuggest#83 which is itself root cause of nim-lang/NimLime#99)

const testCase {.strdefine.}: string=0
when false: discard
elif testCase == "test1":
nim check $timn_D/tests/nim/all/t0184.nim
t0184.nim(9, 1) Error: invalid indentation
t0184.nim(9, 1) Error: expression expected, but found '[EOF]'
t0184.nim(5, 38) Error: type mismatch: got <int literal(0)> but expected 'string'
  const testCase {.strdefine.}: string=0
                                       ^
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

with stacktraces: nim:

/Users/timothee/git_clone/nim/Nim/compiler/nim.nim(109) nim
/Users/timothee/git_clone/nim/Nim/compiler/nim.nim(73) handleCmdLine
/Users/timothee/git_clone/nim/Nim/compiler/cmdlinehelper.nim(92) loadConfigsAndRunMainCommand
/Users/timothee/git_clone/nim/Nim/compiler/main.nim(305) mainCommand
/Users/timothee/git_clone/nim/Nim/compiler/main.nim(61) commandCheck
/Users/timothee/git_clone/nim/Nim/compiler/modules.nim(134) compileProject
/Users/timothee/git_clone/nim/Nim/compiler/modules.nim(79) compileModule
/Users/timothee/git_clone/nim/Nim/compiler/passes.nim(194) processModule
/Users/timothee/git_clone/nim/Nim/compiler/passes.nim(86) processTopLevelStmt
/Users/timothee/git_clone/nim/Nim/compiler/sem.nim(608) myProcess
/Users/timothee/git_clone/nim/Nim/compiler/sem.nim(571) semStmtAndGenerateGenerics
/Users/timothee/git_clone/nim/Nim/compiler/semstmts.nim(2091) semStmt
/Users/timothee/git_clone/nim/Nim/compiler/semexprs.nim(924) semExprNoType
/Users/timothee/git_clone/nim/Nim/compiler/semexprs.nim(2593) semExpr
/Users/timothee/git_clone/nim/Nim/compiler/semstmts.nim(2031) semStmtList
/Users/timothee/git_clone/nim/Nim/compiler/semexprs.nim(2517) semExpr
/Users/timothee/git_clone/nim/Nim/compiler/semexprs.nim(2146) semWhen
/Users/timothee/git_clone/nim/Nim/compiler/sem.nim(354) semConstExpr
/Users/timothee/git_clone/nim/Nim/compiler/vm.nim(1908) evalConstExpr
/Users/timothee/git_clone/nim/Nim/compiler/vm.nim(1904) evalConstExprAux
/Users/timothee/git_clone/nim/Nim/compiler/vm.nim(877) rawExecute
/Users/timothee/git_clone/nim/Nim/lib/system.nim(3022) sysFatal
Error: unhandled exception: node is not accessible [FieldError]

note

seems unrelated to nim-lang/nimsuggest#93 ; the stacktraces are different

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

2 participants