[ragel-users] Segmentation Fault

Adrian Thurston thurs... at cs.queensu.ca
Mon Dec 17 19:03:58 UTC 2007


I just confirmed it. Will fix it later today.

Adrian

-----Original Message-----
From: Ryan Phelps <rmphelps at gmail.com>

Date: Mon, 17 Dec 2007 10:37:24 
To:ragel-users <ragel-users at googlegroups.com>
Subject: [ragel-users] Segmentation Fault



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?




More information about the ragel-users mailing list