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

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

Thread Previous
Bram via RT
June 21, 2008 16:34
[perl #56202] Attempt to free unreferenced scalar: SV...
Message ID:
On Sat Jun 21 14:59:59 2008, wrote:
> This is a bug report for perl from,
> 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 ./ 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,


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About