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

SIGSEGV with nim c -c and nim e on macro w(): untyped = result = genSym(nskType) #24379

Closed
tersec opened this issue Oct 29, 2024 · 0 comments · Fixed by #24380
Closed

SIGSEGV with nim c -c and nim e on macro w(): untyped = result = genSym(nskType) #24379

tersec opened this issue Oct 29, 2024 · 0 comments · Fixed by #24380

Comments

@tersec
Copy link
Contributor

tersec commented Oct 29, 2024

Description

import std/macros
macro w(): untyped = result = genSym(nskType)
w()

In both Nim and NimScript context (nim c -c and nim e).

Nim Version

Nim Compiler Version 2.0.10 [Linux: amd64]
Compiled at 2024-10-29
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: e941ee15be775fe3c46db1bed9b4f41c7dfb1334
active boot switches: -d:release
Nim Compiler Version 2.0.11 [Linux: amd64]
Compiled at 2024-10-29
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 3713994ef10a17190233b10a5f5502d982e90c0f
active boot switches: -d:release
Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-29
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1876726a49c69d65629ab433ea1310ece1
active boot switches: -d:release
Nim Compiler Version 2.2.1 [Linux: amd64]
Compiled at 2024-10-29
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 15271dba2f4772a193f027d36c05b838dfff5bd4
active boot switches: -d:release

### Current Output

```text
.......................................................................SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault

Expected Output

No compile-time SIGSEGV

Known Workarounds

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants