[Nickle]Invalid input generates segfault
Carl Worth
cworth@east.isi.edu
Thu, 26 Jul 2001 22:35:06 -0400
I've found that the following input cause a segmentation fault in
nickle, (1.99.1, 1.99.2, and CVS as of today):
> int[] a;
Program received signal SIGSEGV, Segmentation fault.
0x804c71e in CompileCompositeImplicitInit (type=0x814f1c0) at
compile.c:1031
1031 if (type->array.dimensions->tree.left)
where, of course, dimensions is NULL.
I assume this should be a syntax error? Maybe it's time to start
feeding random input to nickle to try to crash it? :)
-Carl
PS. I've found that it is quite easy with interactive nickle to get
the parser confused after a syntax error, (but not quite so easy to
unwedge it). For instance:
> int foo()
syntax error before "("
+ )
+
+ }
+ ;
+
+
+ ;
>
> # Phew!
I'm not sure how easy that would be to fix...