develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #115388] threaded perl ignores readonly flag

From:
Father Chrysostomos via RT
Date:
July 26, 2013 07:03
Subject:
[perl #115388] threaded perl ignores readonly flag
Message ID:
rt-3.6.HEAD-2552-1374822204-1509.115388-15-0@perl.org
On Sat Oct 20 16:48:40 2012, mauke- wrote:
> 
> This is a bug report for perl from l.mai@web.de,
> generated with the help of perlbug 1.39 running under perl 5.16.1.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> #!perl
> use warnings;
> use strict;
> 
> {
>     package Proxy;
> 
>     sub TIESCALAR {
>         my ($class, $ref) = @_;
>         bless \$ref, $class
>     }
> 
>     sub FETCH {
>         my ($self) = @_;
>         $$$self
>     }
> 
>     sub STORE {
>         my ($self, $val) = @_;
>         $$$self = $val;
>     }
> }
> 
> sub foo :lvalue {
>     tie my $proxy, 'Proxy', \$_[0];
>     $proxy
> }
> 
> foo(0) = 1;
> 
> __END__
> 
> Threaded:
> This is perl 5, version 16, subversion 1 (v5.16.1) built for i686-
> linux-thread-multi
> $ perl bug.pl
> $
> 
> Unthreaded:
> This is perl 5, version 16, subversion 1 (v5.16.1) built for i686-
> linux
> $ perl bug.pl
> Modification of a read-only value attempted at bug.pl line 20.
> $

As of 82b84d0, threaded perls produce the same result as unthreaded.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=115388



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