[ragel-users] Possible bug in Ragel 6.0

Adrian Thurston thurs... at cs.queensu.ca
Mon Feb 25 22:02:11 UTC 2008

Hey Manoj, thanks for tracking this down. The point zero releases often have a few issues. I'll be able to look at this next week.

-----Original Message-----
From: Manoj Rajagopalan <manoj at nanorex.com>

Date: Thu, 21 Feb 2008 12:33:57 
To:ragel-users at googlegroups.com
Subject: [ragel-users] Possible bug in Ragel 6.0

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?


More information about the ragel-users mailing list