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

Freeze at runtime when seq is used under the block statement #740

Open
demotomohiro opened this issue Mar 11, 2025 · 1 comment
Open

Freeze at runtime when seq is used under the block statement #740

demotomohiro opened this issue Mar 11, 2025 · 1 comment

Comments

@demotomohiro
Copy link
Collaborator

mytests/test.nim:

block:
  var t: seq[int]
$ ./bin/nimony c mytests/test.nim
bin/nimsem  --isSystem m nimcache/sysvq0asl.1.nif nimcache/sysvq0asl.2.nif nimcache/sysvq0asl.2.idx.nif
bin/nimsem  m nimcache/tes9hvujc.1.nif nimcache/tes9hvujc.2.nif nimcache/tes9hvujc.2.idx.nif
cc -c   -Ivendor/mimalloc/include vendor/mimalloc/src/static.c -o nimcache/static.o
bin/hexer --bits:64 nimcache/tes9hvujc.2.nif
bin/nifc c --compileOnly --isMain  nimcache/tes9hvujc.c.nif
cc -c  -Imytests  nimcache/tes9hvujc.c -o nimcache/tes9hvujc.o
bin/hexer --bits:64 nimcache/sysvq0asl.2.nif
bin/nifc c --compileOnly  nimcache/sysvq0asl.c.nif
cc -c  -Imytests  nimcache/sysvq0asl.c -o nimcache/sysvq0asl.o
cc -o nimcache/tes9hvujc nimcache/static.o nimcache/tes9hvujc.o nimcache/sysvq0asl.o
$ ./nimcache/tes9hvujc

./nimcache/tes9hvujc never quit.

@Araq
Copy link
Member

Araq commented Mar 11, 2025

That's a known bug as the compiler does not implement default initialization yet. (But it does call the destructor on uninit'ed memory.)

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