[ragel-users] Segmentation Fault

Adrian Thurston thurs... at cs.queensu.ca
Mon Dec 17 20:22:08 UTC 2007


Hi, here is a patch that fixes the problem. This seems like an important
fix so I'm debating whether or not I should do a 5.25 release instead of
just fixing it 6.0, which is due out soonish.

-Adrian

Ryan Phelps wrote:
> rlgen-java gives me a segmentation fault when run on the XML generated
> by the following code:
> 
> public class SegFault {
>   %%{
>     machine A;
>     write data;
>     main := space* '=' [WHAT?!] @{} space*;
>   }%%
> 
>   private void foo() {
>     int cs, p = 0, pe = 0;
>     char[] data = null;
>     %% write init;
>     %% write exec;
>   }
> 
>   %%{
>     machine B;
>     write data;
>     main := 'blah';
>   }%%
> 
>   private void bar() {
>     int cs, p = 0, pe = 0;
>     char[] data = null;
>     %% write init;
>     %% write exec;
>   }
> }
> 
> This is the most simplified reproduction of the problem that I could
> create after discovering it while trying to implement a configuration
> file parser. The strange part is that the smallest changes to the
> above code will fix it. For example, if I change anything at all with
> 'main' of machine A (like changing [WHAT?!] to [WHA?!], using "space"
> instead of "space*", or getting rid of the empty action), rlgen-java
> will work fine. If I rename machine A to machine S it works fine. If I
> get rid of machine B it works fine.
> 
> Can anyone else verify this or is it just my machine?
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ragel-users" group.
> To post to this group, send email to ragel-users at googlegroups.com
> To unsubscribe from this group, send email to ragel-users-unsubscribe at googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ragel-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ragel-5.24-phelps-segfault.diff
Type: text/x-diff
Size: 314 bytes
Desc: not available
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20071217/8174807b/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20071217/8174807b/attachment-0001.sig>


More information about the ragel-users mailing list