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

Crash when compiling with nims files - only on v0.19.2 #10344

Closed
genotrance opened this issue Jan 17, 2019 · 6 comments
Closed

Crash when compiling with nims files - only on v0.19.2 #10344

genotrance opened this issue Jan 17, 2019 · 6 comments

Comments

@genotrance
Copy link
Contributor

Consider three files:

# a.nim
echo "Hello"
# config.nims
switch("d", "ABC")
# a.nims
switch("d", "DEF")

When compiling a.nim, nim crashes. This is only seen on 0.19.2, not on 0.19.0 or on devel.

> nim c a.nim
Hint: used config file 'C:\Users\gt\.choosenim\toolchains\nim-0.19.2\config\nim.cfg' [Conf]
Hint: used config file 'C:\Dropbox\Private\github\nimterop\config.nims' [Conf]
???(0, 0) Error: internal error: n is not nil
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>

Delete one of the nims files and it works again.

I'm using config.nims for global flags and a.nims for a define that only applies in compiled executable.

@Araq
Copy link
Member

Araq commented Jan 17, 2019

@timotheecour is the bugfix/commit marked with [backport]?

@timotheecour
Copy link
Member

timotheecour commented Jan 17, 2019

no idea, i just added fixed in devel because it works in devel; idk if it's 1 commit or more, or it got fixed by chance as part of another commit; the good news is our git history is now quite linear so git bisect could help to identify it
(all commits since 2018-12-19 10:03 +0100 Andreas Rumpf M─┐ Merge pull request #9959 from nc-x/better-error-message)

@narimiran
Copy link
Member

git bisect could help to identify it

I did git bisect on version-0-19 branch and it spit out 41e2f6b as a first bad commit ;)

@narimiran
Copy link
Member

I just confirmed that reverting that commit would fix this bug in version-0-19 branch.

@timotheecour
Copy link
Member

timotheecour commented Jan 21, 2019

but that fixed a regression itself:
fix #9264 regression (#9265)

so would probably need to backport stuff like #9259 (this PR should have all the context, including the revert of #8590 done in #9265)

@narimiran
Copy link
Member

so would probably need to backport stuff like #9259

You're right, backporting that fixed this issue.

I just pushed that to version-0-19, so the fix will be part of v0.19.4 — this can be closed now.

timotheecour added a commit to timotheecour/wrappers that referenced this issue Feb 1, 2019
timotheecour added a commit to timotheecour/wrappers that referenced this issue Feb 1, 2019
timotheecour added a commit to timotheecour/wrappers that referenced this issue Feb 1, 2019
timotheecour added a commit to nimterop/wrappers that referenced this issue Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants