[ragel-users] Mandelbug causing segfault
Mark Tsuchida
marktsuchida at gmail.com
Wed Dec 15 04:33:55 UTC 2010
Dear Adrian,
Thank you for sharing this great tool.
I am getting a segfault when running Ragel on my input file.
Below is the simplest input file I've been able to create that
triggers the segfault (sorry it's still rather complex).
Whether or not Ragel crashes seems to be (depending on other parts of
the input file) sometimes sensitive to the names given to actions (or
at least the length of those names), among other things. Any given
input file always gives the same result (segfault or no crash),
though.
Giving Ragel the -n or -m option appears to prevent the crash, at
least with the input shown below.
Both version 6.6 and the svn head (r1683) experience the same issue.
I'm on Mac OS X 10.6 and Regal was compiled with g++ 4.2.1 (Xcode
3.2.5) (arch is x86_64 (LP64)).
Please let me know if there is anything else I can provide to help
track this down.
Thanks,
Mark
$ cat test.rl
%%{
machine test;
action action1 {}
action action2 {}
nl = ("\r\n" | [\n\r]);
kw = "aaaaa";
ident = "bbbbb" @action1;
normal = (kw | ident);
first = ([^\n\r] @action1)* . nl;
cont = (
(" " @action1 when action1)* .
(((([^\n\r] @action1)*) . nl @action1) when action1)
);
special = first (cont when action2)** ;
main := (normal when action1) | (special when action1);
}%%
$ ragel test.rl
Segmentation fault
$ ragel -V test.rl
Segmentation fault
$ ragel -T0 test.rl
Segmentation fault
$ ragel -T1 test.rl
Segmentation fault
$ ragel -F0 test.rl
Segmentation fault
$ ragel -F1 test.rl
Segmentation fault
$ ragel -d test.rl
Segmentation fault
$ ragel -e test.rl
Segmentation fault
$ ragel -n test.rl # succeeds
$ ragel -m test.rl # succeeds
$
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list