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

[Regression] Nim segfaults #6435

Closed
yglukhov opened this issue Sep 25, 2017 · 0 comments
Closed

[Regression] Nim segfaults #6435

yglukhov opened this issue Sep 25, 2017 · 0 comments

Comments

@yglukhov
Copy link
Member

type NSScreen {.importc, header: "<AppKit/AppKit.h>", final.} = distinct int
proc mainScreen: NSScreen {.importobjc: "NSScreen mainScreen", nodecl.}
proc scaleFactor(s: NSScreen): float32 = discard
proc screenScaleFactor*(): float =
    result = mainScreen().scaleFactor()
Traceback (most recent call last)
nim.nim(121)             nim
nim.nim(77)              handleCmdLine
main.nim(167)            mainCommand
main.nim(74)             commandCompileToC
modules.nim(240)         compileProject
modules.nim(180)         compileModule
passes.nim(217)          processModule
passes.nim(135)          processTopLevelStmt
cgen.nim(1331)           myProcess
ccgstmts.nim(1127)       genStmts
ccgexprs.nim(2221)       expr
cgen.nim(855)            genProc
cgen.nim(820)            genProcNoForward
cgen.nim(719)            genProcAux
ccgstmts.nim(1127)       genStmts
ccgexprs.nim(2171)       expr
ccgstmts.nim(1120)       genAsgn
ccgstmts.nim(85)         loadInto
ccgexprs.nim(2132)       expr
ccgexprs.nim(1669)       genConv
ccgexprs.nim(1612)       genSomeCast
cgen.nim(486)            initLocExpr
ccgexprs.nim(2112)       expr
ccgcalls.nim(537)        genCall
ccgcalls.nim(176)        genPrefixCall
ccgcalls.nim(159)        genArg
cgen.nim(491)            initLocExprSingleUse
ccgexprs.nim(2112)       expr
ccgcalls.nim(535)        genCall
ccgcalls.nim(524)        genNamedParamCall
ccgexprs.nim(281)        genAssignment
cgen.nim(66)             t
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
@Araq Araq closed this as completed in 77453f3 Sep 25, 2017
edubart pushed a commit to edubart/Nim that referenced this issue Oct 3, 2017
bluenote10 pushed a commit to bluenote10/Nim that referenced this issue Oct 21, 2017
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