Anders Synstad | 19 Jul 2010 13:37
Picon

Cricket compile segfault

Hello,

Unsure if this mailing list is still alive, but thought I should give it 
a go.

I'm currently having some issues with Cricket's compile. One of the 
configuration files I generate, contain 'mtargets = ""' with a large 
number of targets (1000+). This seems to cause compile to segfault 
consistently. :(

Another config file have mtargets with aprox 300 targets. And this seems 
to work fine.

Before I started to investigate the deep and gory perl details, I was 
wondering if anyone had experienced this and possible had a solution for it?

Regards,
Anders Synstad
Basefarm AS

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
Anders Synstad | 26 Aug 2010 16:17
Picon

Re: Cricket compile segfault

I finaly found the root cause for this segfault, and thought I'd share 
it with whomever wants.

The 'compile' script uses ConfigTree::Node, which again uses 
Text::ParseWords. In the parse_line sub, there is a regexp that is run 
on the value from the cricket config (my very long  mtargets (45000+ 
chars)).

On my system, this causes perl itself to segfault on variables larger 
than about 20680 chars. I'm sure this number may vary from machine to 
machine. It seems like at least this version of perl simply can't handle 
running regexps on such large variables.

On my machine I'm running and old perl 5.8.8 (I know, can't blame anyone 
when running an old perl), however, upgrading is not that simple in my case.

I did use a small proof-of-concept test script to verify and test the 
problem:

	#!/local/bin/perl

	$| = 1;

	use strict;
	use warnings;
	use Text::ParseWords;

	my $start	= 20000;
	my $step	= 100;
	my $max		= 100000;
(Continue reading)


Gmane