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

Toast segfault with comment after define #297

Open
lchenut opened this issue May 4, 2023 · 0 comments
Open

Toast segfault with comment after define #297

lchenut opened this issue May 4, 2023 · 0 comments

Comments

@lchenut
Copy link

lchenut commented May 4, 2023

Using toast --pnim --preprocess --noheader test.h

With this code:

#define VALUE 1 /* comment */
char array[VALUE + 1];

Produces a segfault:

# Command line:
#   /home/lchenut/.nimble/pkgs/nimterop-0.6.13/nimterop/toast --pnim --preprocess --noheader test.h

{.push hint[ConvFromXtoItselfNotNeeded]: off.}

Error: internal error: renderer.gsub(nkNone)
Traceback (most recent call last)
toast.nim(227)           toast
cligen.nim(810)          cligenScope
cligen.nim(724)          dispatchmain
toast.nim(153)           main
ast2.nim(1963)           printNim
renderer.nim(1712)       renderTree
renderer.nim(684)        gstmts
renderer.nim(576)        gsub
renderer.nim(1525)       gsub
renderer.nim(576)        gsub
renderer.nim(1262)       gsub
renderer.nim(934)        gsub
renderer.nim(576)        gsub
renderer.nim(1140)       gsub
renderer.nim(640)        gcomma
renderer.nim(604)        gcommaAux
renderer.nim(576)        gsub
renderer.nim(1702)       gsub
msgs.nim(606)            internalErrorImpl
msgs.nim(561)            liMessage
msgs.nim(413)            handleError
msgs.nim(398)            quit
options.nim(584)         isDefined
strtabs.nim(207)         hasKey
strtabs.nim(133)         rawGet
strtabs.nim              myhash
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault (core dumped)
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

1 participant