Reproducable crash

Alexander Strange astra... at gmail.com
Wed Jan 24 02:58:36 UTC 2007



On Jan 23, 8:27 pm, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
> I can't seem to reproduce the crash. I think it might be architecture
> dependent. Are you running on a Mac? Bus errors in Ragel seem to crop up
> only on Macs.

Yes (10.4.8 i386), which means I don't have access to valgrind. I might
try to debug it later myself if you can't reproduce it, though.

> crasher = any*;
> tag = "{" cmd* crasher "}";
>
> This is heavily ambiguous. The any* will never end. Also the any* of the
> text machine will never end. What happens when you change it to
> something unambiguous?
>
> crasher = [^}]*;
> text = [^\\{]*;

text is actually supposed to be ambiguous; the people who made this
file format didn't think about parsing simplicity when they did it :(

I can certainly give that up for now, though.

With the current file, those two lines work. Changing either of them to
any* crashes. Using them and -m or -n crashes.

There are a few more situations, but since the presence of crasher was
causing cmd to do unintentional things (call the num and fsize exit
actions on every digit of "{\fs40.12}" instead of only at the end) I've
removed it anyway.

So, it looks like all is well. I'll report back if I have any useful
patches.

> Regards,
>   Adrian



More information about the ragel-users mailing list