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

methods cause compiler to segfault #3

Closed
mikebenfield opened this issue Jan 2, 2011 · 3 comments
Closed

methods cause compiler to segfault #3

mikebenfield opened this issue Jan 2, 2011 · 3 comments
Labels

Comments

@mikebenfield
Copy link

Code:
method m(i: int): int =
return 5

Result:
Mike-Benfields-MacBook:Code mike$ nimrod compile --run sample.nim
Hint: used config file '/Users/mike/Applications/nimrod/config/nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: sample [Processing]
No stack traceback available
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

Nimrod 0.8.10.
Mac OS 10.6.3.

@jameshfisher
Copy link

Same on Ubuntu 10.04. Also Nimrod 0.8.10. Also, what is presumably the same bug is caused by this simpler code:

method m(): int

@adilkhash
Copy link

same shit in windows xp with nimrod 0.8.10

@Araq
Copy link
Member

Araq commented Jan 6, 2011

Fixed. Compiler now rejects this code.

dom96 pushed a commit that referenced this issue May 31, 2018
DongyunLee pushed a commit to nim-lang-cn/Nim that referenced this issue Nov 18, 2019
n5m added a commit to n5m/Nim that referenced this issue Jul 11, 2021
# This is the 1st commit message:

default last in strutils.find to -1

# This is the commit message nim-lang#2:

Revert "default last in strutils.find to -1"

This reverts commit 3a99556.

# This is the commit message nim-lang#3:

add openArray variable of find with SkipTable

# This is the commit message nim-lang#4:

add find method that accepts an openArray

# This is the commit message nim-lang#5:

add tests

# This is the commit message nim-lang#6:

Revert "add find method that accepts an openArray"

This reverts commit 2ab5351.

# This is the commit message nim-lang#7:

Revert "add openArray variable of find with SkipTable"

This reverts commit 58159fc.
n5m added a commit to n5m/Nim that referenced this issue Jul 11, 2021
# This is the 1st commit message:

default last in strutils.find to -1

# This is the commit message nim-lang#2:

Revert "default last in strutils.find to -1"

This reverts commit 3a99556.

# This is the commit message nim-lang#3:

add openArray variable of find with SkipTable

# This is the commit message nim-lang#4:

add find method that accepts an openArray

# This is the commit message nim-lang#5:

add tests

# This is the commit message nim-lang#6:

Revert "add find method that accepts an openArray"

This reverts commit 2ab5351.

# This is the commit message nim-lang#7:

Revert "add openArray variable of find with SkipTable"

This reverts commit 58159fc.
n5m added a commit to n5m/Nim that referenced this issue Aug 21, 2021
# This is the 1st commit message:

default last in strutils.find to -1

# This is the commit message nim-lang#2:

Revert "default last in strutils.find to -1"

This reverts commit 3a99556.

# This is the commit message nim-lang#3:

add openArray variable of find with SkipTable

# This is the commit message nim-lang#4:

add find method that accepts an openArray

# This is the commit message nim-lang#5:

add tests

# This is the commit message nim-lang#6:

Revert "add find method that accepts an openArray"

This reverts commit 2ab5351.

# This is the commit message nim-lang#7:

Revert "add openArray variable of find with SkipTable"

This reverts commit 58159fc.
n5m added a commit to n5m/Nim that referenced this issue Jan 5, 2022
# This is the 1st commit message:

default last in strutils.find to -1

# This is the commit message nim-lang#2:

Revert "default last in strutils.find to -1"

This reverts commit 3a99556.

# This is the commit message nim-lang#3:

add openArray variable of find with SkipTable

# This is the commit message nim-lang#4:

add find method that accepts an openArray

# This is the commit message nim-lang#5:

add tests

# This is the commit message nim-lang#6:

Revert "add find method that accepts an openArray"

This reverts commit 2ab5351.

# This is the commit message nim-lang#7:

Revert "add openArray variable of find with SkipTable"

This reverts commit 58159fc.
krux02 pushed a commit to krux02/Nim that referenced this issue Jan 11, 2022
* Fixed generic distinct conversion proc calls
* added skipDistincts and documented changes
ci4ic4 added a commit to ci4ic4/Nim that referenced this issue Dec 30, 2022
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
nim-lang#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
nim-lang#2  0x000000000048980e in initThreadVarsEmulation ()
nim-lang#3  0x0000000000489848 in PreMain ()
nim-lang#4  0x000000000048986a in NimMain ()
nim-lang#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.
Araq pushed a commit that referenced this issue Jan 2, 2023
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
#2  0x000000000048980e in initThreadVarsEmulation ()
#3  0x0000000000489848 in PreMain ()
#4  0x000000000048986a in NimMain ()
#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.
narimiran pushed a commit that referenced this issue Jan 2, 2023
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
#2  0x000000000048980e in initThreadVarsEmulation ()
#3  0x0000000000489848 in PreMain ()
#4  0x000000000048986a in NimMain ()
#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.

(cherry picked from commit e9ed090)
capocasa pushed a commit to capocasa/Nim that referenced this issue Mar 31, 2023
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
nim-lang#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
nim-lang#2  0x000000000048980e in initThreadVarsEmulation ()
nim-lang#3  0x0000000000489848 in PreMain ()
nim-lang#4  0x000000000048986a in NimMain ()
nim-lang#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.
bung87 pushed a commit to bung87/Nim that referenced this issue Jul 29, 2023
tlsEmulation:on under NetBSD-10Beta and NetBSD-current produces an executable which crashes immediately as follows:

Core was generated by `koch'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000047b4c2 in nimZeroMem ()
(gdb) bt
#0  0x000000000047b4c2 in nimZeroMem ()
#1  0x00000000004897b2 in threadVarAlloc__system_2162 ()
#2  0x000000000048980e in initThreadVarsEmulation ()
nim-lang#3  0x0000000000489848 in PreMain ()
nim-lang#4  0x000000000048986a in NimMain ()
nim-lang#5  0x00000000004898a9 in main ()

I can't speak about the other BSDs.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants