develooper Front page | perl.perl5.porters | Postings from March 2006

[perl #31887] Regexp /^([^f]|f.)+/ Bus error

From:
Steve Peters via RT
Date:
March 29, 2006 10:46
Subject:
[perl #31887] Regexp /^([^f]|f.)+/ Bus error
Message ID:
rt-3.0.11-31887-131676.12.400966693258@perl.org
> [mmartinec - Thu Oct 07 16:07:42 2004]:
> 
> This is a bug report for perl from Mark.Martinec@ijs.si,
> generated with the help of perlbug 1.35 running under perl v5.8.5.
> 
> To: perlbug@perl.org
> Subject: Regexp /^([^f]|f.)+/ Bus error
> Reply-To: root@niobe.ijs.si
> Message-Id: <5.8.5_76335_1097189025@niobe.ijs.si>
> 
> This is a bug report for perl from root@niobe.ijs.si,
> generated with the help of perlbug 1.35 running under perl v5.8.5.
> 
> 
> -----------------------------------------------------------------
> The following command causes Bus error:
> 
>   perl -e '$_ = "0" x 2000; /^([^f]|f.)+/'
>   Bus error (core dumped)
> 
> The test case has been minimized from the original program
> which tests for jpeg validity. The error is quite persistent
> across wide range of variant test cases and regexp variations.
> 
> It is interesting that the problem is repeatable at will at two
> different sites (Perl 5.8.5 on FreeBSD, as well as Perl 5.8.3 on
> RedHat), but does not occur at a dozen other hosts where I tested it.
> 
> It should be pointed out that both failing installations have
> otherwise fully operational Perl which is heavily used in
> production (SpamAssassin, etc) and works reliably.
> 
> My wild guess it that a Perl compiled with threads fails,
> although this is not confirmed.
> 

This problem has been resolved with change #27598.

steve@kirk:~/smoke/perl-current$ perl -e '$_ = "0" x 2000; /^([^f]|f.)+/'
steve@kirk:~/smoke/perl-current$ perl -e '$_ = "0" x 5000; /^([^f]|f.)+/'
Segmentation fault (core dumped)
steve@kirk:~/smoke/perl-current$ ./perl -e '$_ = "0" x 5000; /^([^f]|f.)+/'
steve@kirk:~/smoke/perl-current$ ./perl -e '$_ = "0" x 50000; /^([^f]|f.)+/'
steve@kirk:~/smoke/perl-current$



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About