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

[perl #27838] core dump in regex with code and die/eval

Thread Next
From:
Steve Peters via RT
Date:
April 17, 2006 11:09
Subject:
[perl #27838] core dump in regex with code and die/eval
Message ID:
rt-3.0.11-27838-132329.14.1549764212599@perl.org
> [perl-5.8.0@ton.iguana.be - Mon Mar 22 07:23:24 2004]:
> 
> 
> This is a bug report for perl from perl-5.8.0@ton.iguana.be,
> generated with the help of perlbug 1.34 running under perl v5.8.2.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> This dumps core for me:
> 
> #! /usr/bin/perl
> @tests = ({
>               in => "ab(c(hi)d)ef\2gh",
>           },
>           {
>               in => "ab(c(hi)d)ef\2gh",
>           });
> 
> for my $test (@tests) {
>     eval {
>         $test->{in} =~ /(?{die})/;
>     };
> }
> 
> I only have 5.8.2. I also let someone on 5.8.3 test it, it didn't dump
> core for him. However, the core is pretty sensitive to the string
>    lengths.
> By adding x 10 after each string his version cored too, but for me
>    that
> makes the core go away.
> 5.8.0 for i386-bsd gives a memory fault. Maybe a wild pointer...
> 

The above code is currently coredumping with the following backtrace. 
#0  0x080d6da3 in Perl_vivify_ref (sv=0x19, to_what=64) at pp_hot.c:2989
2989        SvGETMAGIC(sv);
(gdb) bt
#0  0x080d6da3 in Perl_vivify_ref (sv=0x19, to_what=64) at pp_hot.c:2989
#1  0x080c44fa in Perl_pp_padsv () at pp_hot.c:279
#2  0x0808b967 in Perl_runops_debug () at dump.c:1698
#3  0x080b8c15 in S_run_body (oldscope=1) at perl.c:2373
#4  0x080b823f in perl_run (my_perl=0x826e008) at perl.c:2298
#5  0x0805e700 in main (argc=2, argv=0xbf97f534, env=0xbf97f540)
    at perlmain.c:103



Thread Next


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