sasq64 / bass

Advanced 6502 assembler
23 stars 4 forks source link

segfault on "Lambda" block #5

Closed antis81 closed 3 years ago

antis81 commented 3 years ago

While assembling I stumbled upon a coredump situation:

~/.../Grafik/mapengine >>> bass -i macros/heightmap.asm -o DELETE_ME.prg -DHEIGHTMAP                                                                                                                                                                    ±[●●][bass]
* PARSING
Using cached AST
* PASS 1
Using cached AST
Using cached AST
zsh: segmentation fault (core dumped)  bass -I macros -i macros/heightmap.asm -o DELETE_ME.prg -DHEIGHTMAP

Here's a link to my work-branch so you can try for yourself. Note this is a work-in-progress - means the code still contains a lot of syntax and semantic errors.

antis81 commented 3 years ago

FYI: Here's what I got with coredumpctl debug.

…
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `bass -i macros/heightmap.asm -o DELETE_ME.prg -DHEIGHTMAP'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::any::has_value (this=0x0) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/any:329
329         bool has_value() const noexcept { return _M_manager != nullptr; }
…
(gdb)

Unfortunately strace doesn't provide more info. Ideas anyone?

antis81 commented 3 years ago

Ok found it! Will prepare a PR later and hope it is getting merged soon enough.