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

Re: threads error: Attempt to free unreferenced scalar...

Thread Previous | Thread Next
From:
Jerry D. Hedden
Date:
June 26, 2007 06:32
Subject:
Re: threads error: Attempt to free unreferenced scalar...
Message ID:
1ff86f510706260632i1c9e5ad9i7a545ed73cc26b47@mail.gmail.com
Jerry D. Hedden wrote:
> The following code snippet produces the error:
>
>     use threads;
>
>     sub thr
>     {
>         # Causes 'Attempt to free unreferenced scalar: ...' message
>         threads->new($_[0]);
>
>         # Okay - no message
>         #threads->new(shift);
>     }
>
>     thr(sub { })->join;
>
> Is this the same problem as
>     http://rt.perl.org/rt3/Ticket/Display.html?id=41138
> and
>     http://rt.perl.org/rt3/Ticket/Display.html?id=41816
> but in the opposite direction (leaked vs unref'ed)?

Here's another example posted to perl-ithreads@perl.org:

    use threads;

    my $my_sub = sub { };

    threads->create($my_sub)->join();

Dave, any tuits available to look into all of this?

Thread Previous | 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