Re: memstruct segfaults
- Posted by mattlewis (admin) Feb 06, 2015
- 1744 views
ghaberek said...
There are at least two syntax errors I've been able to produce that result in a Segmentation fault crash.
A handy way to debug this sort of thing (front end segfault) is to run with the interpreted front end (eui.ex).
ghaberek said...
-- segfault when referencing a memstruct within itself. should be "syntax error, -- memstruct cannot reference itself directly. did you mean 'pointer TEST_STRUCT next'?" memstruct TEST_STRUCT TEST_STRUCT next end memstruct
Hmm...this one seems to be getting into an infinite loop, which kinda makes sense. That's a bad declaration. I'm sure that should be a pointer to a TEST_STRUCT.
ghaberek said...
-- segfault when referencing an undefined memtype. should be "memtype 'bool' has not been declared." memstruct TEST_STRUCT bool enabled end memstruct
This one I get:
std/sequence.e:2276 in function join() type_check failure, items is 172 ... called from /home/matt/eu/oe/hg/source/fwdref.e:1187 in procedure Resolve_forward_references() ... called from /home/matt/eu/oe/hg/source/parser.e:5242 in procedure parser() ... called from /home/matt/eu/oe/hg/source/main.e:201 in procedure main() ... called from /home/matt/eu/oe/hg/source/main.e:228 --> See ex.err
So...have to dig into these to see what's going on. Thanks for the heads up.
Matt