[ragel-users] terminate called after throwing an instance of 'std::bad_alloc'

Adrian Thurston thurston at complang.org
Tue Apr 14 02:12:56 UTC 2009

Try using -T0. My guess is that the alphabet size is large and the 
allocation of tables is eating up too much memory.

To confirm you can run:

ragel -F -R -x sip_parser.rl > out.xml
rlgen-ruby out.xml


IƱaki Baz Castillo wrote:
> 2009/4/9 Adrian Thurston <thurston at complang.org>:
>> That's a memory allocation error. My guess is that some allocation size
>> is wrong due to some bad code with respect to 64bit. Could you provide
>> the runtime options and a backtrace with gdb? First run ragel -x and
>> then run the backend program manually with gdb.
> Thanks Adrian, but I'm not sure how to check it.
> I've a Ragel grammar file in Ruby (sip_parser.rl). I compile it in
> Debian Etch 64 bits with Ragel 6.4 installed from sources:
> # ragel -F1 -R sip_parser.rl
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  St9bad_alloc
> Aborted
> # ragel -F1 -R sip_parser.rl -x
> (I( get the internal XML)
> But I don't know what you mean with "run the backend program manually
> with gdb". I use gdb to debug coredumps in other programms, but have
> no idea of what to do with it in this case.
> Could you please indicate the steps I must perform? Thanks a lot.
> PD: I've tryed this issue in two different Linux hosts both of 64 bits.

More information about the ragel-users mailing list