develooper Front page | perl.perl5.porters | Postings from September 2003

[perl #23803] blead: local $_ doesn't mix with @_ => Modification of a read-only value attempted

Thread Previous | Thread Next
From:
Stas Bekman
Date:
September 13, 2003 16:33
Subject:
[perl #23803] blead: local $_ doesn't mix with @_ => Modification of a read-only value attempted
Message ID:
rt-23803-64563.1.30124856698743@rt.perl.org
# New Ticket Created by  Stas Bekman 
# Please include the string:  [perl #23803]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23803 >


This is a bug report for perl from stas@stason.org,
generated with the help of perlbug 1.34 running under perl v5.9.0.
-----------------------------------------------------------------

This script:

foo("bbb");
sub foo {
     for (@_) {
         for my $key (1..2) {
             local $_ = 'x';
             s/(.*)/+$1/;
         }
         print;
     }
}

generates:

Modification of a read-only value attempted at test line 7

under blead@21198. It works fine with 5.8.1@21184 and lower.

This problem breaks the mod_perl 1.0 build.

-----------------------------------------------------------------
---
Flags:
     category=core
     severity=high
---
Site configuration information for perl v5.9.0:

Configured by stas at Fri Sep 12 14:42:18 PDT 2003.

Summary of my perl5 (revision 5.0 version 9 subversion 0 patch 21198) 
configuration:
   Platform:
     osname=linux, osvers=2.4.21-0.18mdkcustom, archname=i686-linux
     uname='linux rabbit.stason.org 2.4.21-0.18mdkcustom #6 mon jun 16 
16:26:34 est 2003 i686 unknown unknown gnulinux '
     config_args='-des -Dprefix=/home/stas/perl/blead -Doptimize=-g 
-Duseshrplib -Dusedevel -DDEBUG_LEAKING_SCALARS'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef useithreads=undef usemultiplicity=undef
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
     optimize='-g',
     cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-I/usr/include/gdbm'
     ccversion='', gccversion='3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)', 
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
     gnulibc_version='2.3.2'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/home/stas/perl/blead/lib/5.9.0/i686-linux/CORE'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
     DEVEL20173

---
@INC for perl v5.9.0:
     /home/stas/perl/blead/lib/5.9.0/i686-linux
     /home/stas/perl/blead/lib/5.9.0
     /home/stas/perl/blead/lib/site_perl/5.9.0/i686-linux
     /home/stas/perl/blead/lib/site_perl/5.9.0
     /home/stas/perl/blead/lib/site_perl
     .

---
Environment for perl v5.9.0:
     HOME=/home/stas
     LANG=en_AU
     LANGUAGE=en_AU:en_US:en
     LC_ADDRESS=en_AU
     LC_COLLATE=en_AU
     LC_CTYPE=en_AU
     LC_IDENTIFICATION=en_AU
     LC_MEASUREMENT=en_AU
     LC_MESSAGES=en_AU
     LC_MONETARY=en_AU
     LC_NAME=en_AU
     LC_NUMERIC=en_AU
     LC_PAPER=en_AU
     LC_TELEPHONE=en_AU
     LC_TIME=en_AU
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
 
PATH=/usr//bin:/bin:/usr/bin:.:/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/stas/bin:/home/stas/bin:/usr/local/bin:/usr/X11R6/bin:/usr/java/j2re1.4.0/bin/
     PERLDOC_PAGER=less -R
     PERL_BADLANG (unset)
     SHELL=/bin/tcsh


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



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