hlorenzi / customasm

💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Apache License 2.0
720 stars 56 forks source link

stack overflow error when trying to assemble files with recursive include directives #29

Closed jonicho closed 3 years ago

jonicho commented 4 years ago

steps to reproduce:

output of customasm a.asm:

customasm v0.10.6
assembling `a.asm`...

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

I think the assembler should terminate gracefully instead of crashing. (maybe when an include depth limit is reached?) The error also occurs when a file includes itself, maybe this should't be allowed in the first place?