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

vm crash #1234

Closed
fowlmouth opened this issue May 27, 2014 · 4 comments
Closed

vm crash #1234

fowlmouth opened this issue May 27, 2014 · 4 comments
Labels
Medium Priority VM see also `const` label

Comments

@fowlmouth
Copy link
Contributor

calling a macro defMsg from inside a template (x) crashes the compiler.

import entoody # https://bitbucket.org/fowlmouth/entoody

proc msg* (arg:int) {.unicast.}

template x (ty;body:stmt): stmt {.immediate.} =
  defMsg(ty, msg) do (arg:int):
    body

type Foo = object
x(Foo): 
  echo "FOO!"
@reactormonk
Copy link
Contributor

A reduction of the bug without external dependencies would be appreciated.

@fowlmouth
Copy link
Contributor Author

I couldn't, I spent an hour on it.
Yall act like its so hard to clone a repository.

@jangko
Copy link
Contributor

jangko commented Dec 17, 2015

no longer crash the vm, but also produce nothing

@Araq
Copy link
Member

Araq commented Apr 4, 2016

Like the 'anon proc' at compile-time bug which I finally fixed. Also no feedback. Closing.

@Araq Araq closed this as completed Apr 4, 2016
Araq pushed a commit that referenced this issue Jun 26, 2020
…` + other guidelines (#14796)

* add a testing convention in nep1
* misc updates to contributing.rst and docstyle.rst
* address comments
This was referenced Jan 10, 2021
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Feb 24, 2024
## Summary

Clean up the category and enable it for all targets by default. This
significantly increases test coverage of exceptions for the JS and VM
targets.

## Details

**General changes/cleanup:**
* references to issues like `nim-lang#1234` are replaced with proper GitHub
  links
* the `targets` key is removed for tests that should be run on all
  targets
* usage of `cmd` is replaced with usage of `matrix` (allowing for
  multi-target testing)
* `write(stdout, ...)` is replaced with `echo` in order to support the
  JS and VM targets
* execution of `static:` blocks is replaced with using the VM target,
  when the test is not specific to compile-time execution
* tests that don't work but should are marked as `knownIssue`

**Specific changes:**
* where not necessary for the test, `getCurrentExceptionMsg` is
  replaced with `getCurrentException().msg`, as the former is not yet
  supported by the VM
* `texceptions2.nim` is removed -- it's redundant with `texception.nim`
* `texception_message_null_byte.nim` is turned into a normal test that
  doesn't rely on self-execution
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Mar 13, 2024
## Summary

All code generators use the new goto-using variant of the CGIR now,
rendering the legacy variant obsolete. This is an internal-only
refactoring.

## Details

* remove the `cgirgen_legacy` module
* remove the node kinds belonging to the legacy variant
* remove the sets introduced for the transition
* remove some leftover usages of `cnkStmtListExpr` (they were dead code
  already)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Priority VM see also `const` label
Projects
None yet
Development

No branches or pull requests

5 participants