develooper Front page | perl.perl5.porters | Postings from June 2008

[perl #56202] Attempt to free unreferenced scalar: SV...

Thread Previous
From:
Bram via RT
Date:
June 21, 2008 16:34
Subject:
[perl #56202] Attempt to free unreferenced scalar: SV...
Message ID:
rt-3.6.HEAD-6656-1214091011-1345.56202-15-0@perl.org
On Sat Jun 21 14:59:59 2008, cappella@glacier.mikecappella.com wrote:
> This is a bug report for perl from cappella@glacier.mikecappella.com,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> I'm hitting what appears to be a bug in creating an array of qr's:
> 
>  Attempt to free unreferenced scalar: SV 0x8066318, Perl interpreter:
>    0x804e000 at ./t.pl line 137.
> 
> The code and output is below. Note the error message and the resulting
>    output
> for array slices 127-131. The behavior changes when run under the
>    debugger
> (no warning about Attempt to free unreferenced memory, and the output
>    for
> the array is correct).
> 

On perl-5.8.8 I see empty elements for index 127-131.
On perl-5.8.9-tobe, perl-5.10.0 and perl-blead I see no empty elements.

If I add:  use strict  in the code then I do get *** glibc detected *** 
double free or corruption (!prev): 0x08135f00 *** with 5.8.8. (5.8.9-
tobe works fine)


Also: the /o modifier in your regexes does nothing.
(It is best never to use /o.)


If I use: 

my @ignore_list = (
   qr/ all milters$/,          # 0
   ...
   qr/^write to [a-fA-F\d]{8}/,                # 126
);
   
push @ignore_list, (
   qr/^xsasl_cyrus_server_/,           # 127
   ...
   qr/socket: wanted attribute: /,             # 131
);

Then I do get the expected output.

Can you try this work around and confirm that the error goes away?


Kind regards,

Bram

Thread Previous


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