Hi Albert, Happy Christmas by the way!
I am encountering segfaults in some code I'm working on, and it seems to be something to do with pointers. I've been trying to create a simplified example of the issue; so far I have found that the following will consistently trigger a segfault from the interactive prompt:
> let p = pointer ""; > string p; "" > string p; Program received signal SIGSEGV, Segmentation fault.
I'm not sure if this is the same issue as the one I'm experiencing in my code, but it looks like it's an issue anyway, so I figured I'd report it. When I compile Pure with debuging symbols and run through GDB I get the following backtrace for the above example:
#0 0x00007ffff7b2e0e5 in printstr(char const*) () from /usr/lib/libpure.so.8 #1 0x00007ffff7a06179 in operator<<(std::ostream&, _pure_expr const*) () from /usr/lib/libpure.so.8 #2 0x00007ffff79e35fb in interpreter::exec(expr*) () from /usr/lib/libpure.so.8 #3 0x00007ffff7b532c8 in yy::parser::parse() () from /usr/lib/libpure.so.8 #4 0x00007ffff79ec554 in interpreter::run(int, std::string const&, bool, bool) () from /usr/lib/libpure.so.8 #5 0x00000000004045b1 in ?? () #6 0x00007ffff4e2c040 in __libc_start_main () from /usr/lib/libc.so.6 #7 0x0000000000407dd5 in ?? ()