Subject: | segfault when using as_list on large enough sets |
Hello,
here is a test case for this bug, which causes a segfault:
use DateTime::Set;
use DateTime;
my $span = DateTime::Span->from_datetimes( start => DateTime->new( year
=> 1971 ), end => DateTime->new( year => 2009 ) );
my $set = DateTime::Set->from_recurrence(
recurrence => sub {
return $_[ 0 ] if $_[ 0 ]->is_infinite;
return $_[ 0 ]->truncate( to => 'day' )->add( days => 1 );
},
);
my @array = $set->as_list( span => $span );
I have tested it on two machines with the same result, with perl 5.8.8
and perl 5.10 under Linux. Memory comsumption is well under what is
available. If starting date is 1980 or more, everything runs fine.