Possible bug in Ragel 6.0

Manoj Rajagopalan ma... at nanorex.com
Thu Feb 21 17:33:57 UTC 2008


Hi all,

   Ragel has been crashing with non-descript errors and I've spent a lot 
of time trying to find out the cause of the crash. I've made partial 
progress and would like to inform you about this and could benefit from 
an expert's help.

  I'm attaching a ragel file that I'm trying to compile with the command:

   ragel -C mmp-parser.rl -o mmp-parser.cpp

The crash is in the front-end and the segfault can be seen with

   ragel -x mmp-parser.rl

 From the backtrace, I've been able to see that in the following lines 
(ragel/fsmgraph.cpp: 226-229)

     for ( StateSet::Iter st = finStateSet; st.lte(); st++ ) {
         if ( *st != startState )
             mergeStatesLeaving( md, *st, startState );
     }

the value returned by *st is (StateAp *)0x0, NULL pointer! This is what 
is causing the segfault.

So StateSet is a container (a Vector<StateAp*>) with one entry being a 
NULL pointer. Does someone know how this could creep in?

Thanks,
Manoj
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mmp-parser.rl
URL: <http://www.colm.net/pipermail/ragel/attachments/20080221/c85588e2/attachment.ksh>


More information about the ragel-users mailing list