Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lvalue subs not working inside debugger #4006

Closed
p5pRT opened this issue May 19, 2001 · 23 comments
Closed

lvalue subs not working inside debugger #4006

p5pRT opened this issue May 19, 2001 · 23 comments

Comments

@p5pRT
Copy link

p5pRT commented May 19, 2001

Migrated from rt.perl.org#7013 (status was 'resolved')

Searchable as RT7013$

@p5pRT
Copy link
Author

p5pRT commented May 19, 2001

From coyote.frank@gmx.net

The following short program works fine outside the debugger
but fails silently inside (e.g. $x will remain undef)​:

  my $x;
  sub test​:lvalue { $x };
  test = 4;
  print test(),"\n";

tested with 5.6.0 and 5.6.1

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.6.1:

Configured by stef at Fri Apr 27 12:01:41 CEST 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.3-20mdk, archname=i686-linux-thread
    uname='linux india.local 2.4.3-20mdk #1 sun apr 15 23:03:10 cest 2001 i686 unknown '
    config_args='-Dprefix=/usr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=define useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -fno-strict-aliasing'
    ccversion='', gccversion='2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)', 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, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.1:
    /usr/lib/perl5/5.6.1/i686-linux-thread
    /usr/lib/perl5/5.6.1
    /usr/lib/perl5/site_perl/5.6.1/i686-linux-thread
    /usr/lib/perl5/site_perl/5.6.1
    /usr/lib/perl5/site_perl/5.6.0
    /usr/lib/perl5/site_perl
    .


Environment for perl v5.6.1:
    HOME=/homes/stef
    LANG=en
    LANGUAGE=en_US:en
    LC_COLLATE=en_US
    LC_CTYPE=en_US
    LC_MESSAGES=en_US
    LC_MONETARY=en_US
    LC_NUMERIC=en_US
    LC_TIME=en_US
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=.:/homes/stef/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/X11R6/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 26, 2001

From @floatingatoll

Your bug is confirmed under 5.7.1 and perl-current as well. A second test
case is provided above. Do we have a t/*.t for the debugger (similar to
taint)?

R.

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2002

From germain@ebooksfrance.com

Here is a simple test case :

#!/usr/bin/perl -w
my $a;
sub foo ()​: lvalue {$a};
foo = 1;
print +(foo?"foo is true"​:"foo is still undef")."\n";
__END__

When ran through perl 5.6.1 or 5.8.0, this program outputs
"foo is true"

when ran through perl -d, it outputs
"foo is still undef"

We are stuck with this problem for PerlQt (http​://perlqt.sourceforge.net)
which uses lvalue subs quite a lot.

Thanks,
Germain

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2004

From @schwern

Confirmed this is still a problem in bleadperl and 5.8.5.

@p5pRT
Copy link
Author

p5pRT commented Mar 10, 2005

From guest@guest.guest.xxxxxxxx

This problem is caused by the fact that perl wraps each function call to
a &DB​::sub call. DB​::sub isn't an lvalue sub (and couldn't be, I suppose).

However, perl functions have an internal NODEBUG flag that prevents
wrapping. This will break or disable some of the debugger functionality
regarding the lvalue subs, but it enables debugging the rest of the
program. I'm unaware of an easy way to set the flag in perl, but here
comes a horrible hack​:

perl -wle '
sub a​:lvalue {$_}
use Inline C => q{
  void nodebug(CV* cv) {
  CvNODEBUG_on(cv);
  }
};

nodebug(\&a);
a=1;
print'

This program should print "1" with or without -d.

Tuomas

[ggarand - Sun Sep 29 05​:17​:50 2002]​:

Here is a simple test case :

#!/usr/bin/perl -w
my $a;
sub foo ()​: lvalue {$a};
foo = 1;
print +(foo?"foo is true"​:"foo is still undef")."\n";
__END__

When ran through perl 5.6.1 or 5.8.0, this program outputs
"foo is true"

when ran through perl -d, it outputs
"foo is still undef"

We are stuck with this problem for PerlQt (http​://perlqt.sourceforge.net)
which uses lvalue subs quite a lot.

Thanks,
Germain

@p5pRT
Copy link
Author

p5pRT commented Mar 10, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2005

From houstorx@rpc142.cs.man.ac.uk

Created by houstorx@rpc142.cs.man.ac.uk

Lvalue functions don't work properly when running under the
debugger (perl -d). For example, the following code​:

  my $x = 'badbad';
  sub x :lvalue {$x}
  x = "good";
  print "The value of \$x is​: $x\n";

prints 'The value of $x is​: badbad' when you run it with the
debugger. This happens with every version of perl that I've
tested, including 5.8.6 and 5.9.2.

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.8.6:

Configured by houstorx at Wed Jun 29 10:53:40 BST 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.4.20-31.9, archname=i686-linux
    uname='linux rpc142 2.4.20-31.9 #1 tue apr 13 17:38:16 edt 2004 i686 athlon i386 gnulinux '
    config_args='-Dprefix=/local/perl -Doptimize=-g -ders'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=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 -pipe -I/usr/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/gnu/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', 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 -L/opt/gnu/lib'
    libpth=/usr/local/lib /opt/gnu/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=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib -L/opt/gnu/lib'

Locally applied patches:
    


@INC for perl v5.8.6:
    /local/perl/lib/5.8.6/i686-linux
    /local/perl/lib/5.8.6
    /local/perl/lib/site_perl/5.8.6/i686-linux
    /local/perl/lib/site_perl/5.8.6
    /local/perl/lib/site_perl
    .


Environment for perl v5.8.6:
    HOME=/home/X02/houstorx
    LANG=en_GB
    LANGUAGE (unset)
    LC_COLLATE=C
    LD_LIBRARY_PATH=/lib:/usr/lib:/opt/sfw/lib:/opt/gnu/lib:/home/X02/houstorx/lib
    LOGDIR (unset)
    PATH=/local/bin:/local/Acrobat5/bin:/usr/ucb:/opt/perl-5.8/sun4-solaris-64int/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/common/bin:/usr/sbin:/home/X02/houstorx/bin:/opt/prolog/bin:/opt/pl-4.0.9/bin:/opt/teaching/bin:/opt/sfw/bin:/opt/cs/bin:/usr/ccs/bin:/opt/gnu/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2005

From @iabyn

On Sat, Jul 02, 2005 at 10​:03​:42AM -0000, houstorx @​ rpc142. cs. man. ac. uk wrote​:

Lvalue functions don't work properly when running under the
debugger (perl -d). For example, the following code​:

my $x = 'badbad';
sub x :lvalue {$x}
x = "good";
print "The value of \$x is​: $x\n";

prints 'The value of $x is​: badbad' when you run it with the
debugger. This happens with every version of perl that I've
tested, including 5.8.6 and 5.9.2.

The reason is that when running under the debugger, all function calls are
wrapped by a call to BD​::sub, which does (in outline)

  if (wantarray)
  @​res = &$sub;
  ...
  @​res;
  }
  else {
  $res = &$sub;
  ...
  $res;
  }

and of course that blows away the lvalue-ness of the value returned by the
sub.

Can't see an easy way op fixing it.

--
Fire extinguisher (n) a device for holding open fire doors.

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2005

From @smpeters

[davem@​iabyn.com - Sat Jul 02 11​:28​:26 2005]​:

On Sat, Jul 02, 2005 at 10​:03​:42AM -0000, houstorx @​ rpc142. cs. man.
ac. uk wrote​:

Lvalue functions don't work properly when running under the
debugger (perl -d). For example, the following code​:

my $x = 'badbad';
sub x :lvalue {$x}
x = "good";
print "The value of \$x is​: $x\n";

prints 'The value of $x is​: badbad' when you run it with the
debugger. This happens with every version of perl that I've
tested, including 5.8.6 and 5.9.2.

The reason is that when running under the debugger, all function calls
are
wrapped by a call to BD​::sub, which does (in outline)

if \(wantarray\)
@​res = &$sub;
\.\.\.
@​res;
\}
else \{
$res = &$sub;
\.\.\.
$res;
\}

and of course that blows away the lvalue-ness of the value returned by
the
sub.

Can't see an easy way op fixing it.

Actually, this is a old known bug. Merging this one with RT #7013.

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From kynn@panix.com

Subs defined with the lvalue attribute are unrecognized or mishandled
when running inside the Perl debugger. For example the following
script runs fine on the command line but fails in the debugger.

# test_script.pl
use strict;
use warnings;

my $var = 0;

sub foo : lvalue {
  $var;
}

foo = 1;
die "\$var unchanged ($var)" unless $var; # fails in debugger

print "OK​: $var\n";

__END__

% perl test_script.pl
OK​: 1
% perl -d test_script.pl

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main​::(test_script.pl​:4)​: my $var = 0;
main​::(test_script.pl​:5)​: sub foo : lvalue {
  DB<1> c
$var unchanged (0)
at test_script.pl line 12
Debugged program terminated. Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.

Perl Info

Flags:
    category=library
    severity=medium

Site configuration information for perl v5.8.6:

Configured by kynn at Tue Apr 12 12:24:11 EDT 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.4.18-686-smp, archname=i686-linux-ld
    uname='linux luna 2.4.18-686-smp #1 smp sun apr 14 12:07:19 est 2002 i686 unknown '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 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='long double', nvsize=12, 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 -ldbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.6:
    /home/kynn/local/lib/perl/my
    /home/kynn/local/lib/perl/5.8.4
    /home/kynn/local/lib/perl/5.6.1
    /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
    /home/kynn/local/lib/perl5/5.8.6
    /home/kynn/local/lib/perl5/i686-linux-ld
    /home/kynn/local/lib/perl5
    /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
    /home/kynn/local/lib/perl5/5.8.6
    /home/kynn/local/lib/perl5/site_perl/5.8.6/i686-linux-ld
    /home/kynn/local/lib/perl5/site_perl/5.8.6
    /home/kynn/local/lib/perl5/site_perl
    .


Environment for perl v5.8.6:
    HOME=/home/kynn
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/home/kynn/local/lib:/opt/java/jdk/lib/i386
    LOGDIR (unset)
    PATH=.:/home/kynn/local/bin:/home/kynn/local/usr/bin:/home/kynn/local/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/kynn/java/javacc/bin:/opt/java/jdk/bin:/usr/pbs/bin:/home/kynn/opt/ant/bin
    PERL5LIB=/home/kynn/local/lib/perl/my:/home/kynn/local/lib/perl/5.8.4:/home/kynn/local/lib/perl/5.6.1:/home/kynn/local/lib/perl5
    PERL5_CPANPLUS_CONFIG=/home/kynn/.cpanplus/config
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From kynn@panix.com

[ This bug report supersedes #36532, which was mistakenly filed under
  "library" instead of "core". Please disregard/delete/void #36532.
  My apologies. ]

Subs defined with the lvalue attribute are unrecognized or mishandled
when running inside the Perl debugger. For example the following
script runs fine on the command line but fails in the debugger.

# test_script.pl
use strict;
use warnings;

my $var = 0;

sub foo : lvalue {
  $var;
}

foo = 1;
die "\$var unchanged ($var)" unless $var; # fails in debugger

print "OK​: $var\n";

__END__

% perl test_script.pl
OK​: 1
% perl -d test_script.pl

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main​::(test_script.pl​:4)​: my $var = 0;
main​::(test_script.pl​:5)​: sub foo : lvalue {
  DB<1> c
$var unchanged (0)
  at test_script.pl line 12
Debugged program terminated. Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.

Perl Info

Flags:
     category=core
     severity=medium

Site configuration information for perl v5.8.6:

Configured by kynn at Tue Apr 12 12:24:11 EDT 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
   Platform:
     osname=linux, osvers=2.4.18-686-smp, archname=i686-linux-ld
     uname='linux luna 2.4.18-686-smp #1 smp sun apr 14 12:07:19 est 2002 
i686 unknown '
     config_args=''
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=define
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     optimize='-O2',
     cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
     ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 
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='long double', nvsize=12, 
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 -ldbm -ldb -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.2.5'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:



@INC for perl v5.8.6:
     /home/kynn/local/lib/perl/my
     /home/kynn/local/lib/perl/5.8.4
     /home/kynn/local/lib/perl/5.6.1
     /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/5.8.6
     /home/kynn/local/lib/perl5/i686-linux-ld
     /home/kynn/local/lib/perl5
     /home/kynn/local/lib/perl5/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/5.8.6
     /home/kynn/local/lib/perl5/site_perl/5.8.6/i686-linux-ld
     /home/kynn/local/lib/perl5/site_perl/5.8.6
     /home/kynn/local/lib/perl5/site_perl
     .


Environment for perl v5.8.6:
     HOME=/home/kynn
     LANG=C
     LANGUAGE (unset)
     LD_LIBRARY_PATH=/home/kynn/local/lib:/opt/java/jdk/lib/i386
     LOGDIR (unset)
     PATH=.:/home/kynn/local/bin:/home/kynn/local/usr/bin:/home/kynn/local/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/kynn/java/javacc/bin:/opt/java/jdk/bin:/usr/pbs/bin:/home/kynn/opt/ant/bin
     PERL5LIB=/home/kynn/local/lib/perl/my:/home/kynn/local/lib/perl/5.8.4:/home/kynn/local/lib/perl/5.6.1:/home/kynn/local/lib/perl5
     PERL5_CPANPLUS_CONFIG=/home/kynn/.cpanplus/config
     PERL_BADLANG (unset)
     SHELL=/usr/bin/zsh 

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2005

From @nwc10

Superceded by bug 36534
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=36534

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2005

From @schwern

This is a long standing, known bug. See ticket #7013 via
http​://bugs.perl.org. I'm merging this into that ticket.

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 11, 2007

From deepfryed@gmail.com

Created by deepfryed@gmail.com

This is a bug report for perl from deepfryed@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
perl debugger calls the proxy method DB​::sub without preserving the
lvalue attribute
and therefore lvalue subroutines do not work under -d flag.

http​://rt.perl.org/rt3/Public/Bug/Display.html?id=7013

The fix is to patch pp_hot.c and perl5db.pl to call DB​::lsub for lvalued subs
and perl5db.pl to implement DB​::lsub as a lvalued replacement for DB​::sub

Devel​::DProf and similar modules need to be fixed as well, but thats
not part of this
bug report.

patch attached

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.8.8:

Configured by Debian Project at Tue Dec  5 22:42:31 EST 2006.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.18-1-amd64, archname=x86_64-linux-gnu-thread-multi
    uname='linux gkar 2.6.18-1-amd64 #1 smp sat oct 21 18:36:02 cest
2006 x86_64 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.8
-Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian
4.1.1-20)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.6.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
    gnulibc_version='2.3.6'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:



@INC for perl v5.8.8:
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    .


Environment for perl v5.8.8:
    HOME=/web/home/bharanee
    LANG=en_AU.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/web/home/bharanee/bin:/web/home/bharanee/toolbox/codervw
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Dec 11, 2007

From deepfryed@gmail.com

patch.diff

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2007

From dland@landgren.net

On Tue Dec 11 15​:25​:20 2007, deepfryed@​gmail.com wrote​:

This is a bug report for perl from deepfryed@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
perl debugger calls the proxy method DB​::sub without preserving the
lvalue attribute
and therefore lvalue subroutines do not work under -d flag.

http​://rt.perl.org/rt3/Public/Bug/Display.html?id=7013

The fix is to patch pp_hot.c and perl5db.pl to call DB​::lsub for
lvalued subs
and perl5db.pl to implement DB​::lsub as a lvalued replacement for
DB​::sub

I confirm that this bug still exists in the current development version
of perl (or at least patchlevel 32604).

We are, however, in a code freeze for the release of Perl 5.10.0,
scheduled for the 18th of December 2007.

This patch will be addressed at some point soon after that happens.

Thanks,
David Landgren

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2007

From @smpeters

On Dec 11, 2007 5​:25 PM, via RT bharanee rathna
<perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "bharanee rathna"
# Please include the string​: [perl #48489]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=48489 >

This is a bug report for perl from deepfryed@​gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
perl debugger calls the proxy method DB​::sub without preserving the
lvalue attribute
and therefore lvalue subroutines do not work under -d flag.

http​://rt.perl.org/rt3/Public/Bug/Display.html?id=7013

The fix is to patch pp_hot.c and perl5db.pl to call DB​::lsub for lvalued subs
and perl5db.pl to implement DB​::lsub as a lvalued replacement for DB​::sub

Devel​::DProf and similar modules need to be fixed as well, but thats
not part of this
bug report.

patch attached

Thanks very much for this patch. Someone should be looking into it
more closely over the next few weeks. I do have a couple of questions
though. First, there are quite a few changes in the Pod. Is this
simply whitespace fixes? Second, do you have a simple test case that
can be included with Perl's tests for this problem?

Thanks again,

Steve Peters
steve@​fisharerojo.org

@p5pRT
Copy link
Author

p5pRT commented Jan 17, 2008

From deepfryed@gmail.com

Thanks very much for this patch. Someone should be looking into it
more closely over the next few weeks. I do have a couple of questions
though. First, there are quite a few changes in the Pod. Is this
simply whitespace fixes?

Ooops, my @​work vimrc, sorry but yes that must be just white space fixes

Second, do you have a simple test case that
can be included with Perl's tests for this problem?

I will hack one up soon, if you guys have not attempted to write one already

@p5pRT
Copy link
Author

p5pRT commented Nov 14, 2008

From @smpeters

On Wed Jan 16 21​:51​:32 2008, deepfryed@​gmail.com wrote​:

Thanks very much for this patch. Someone should be looking into it
more closely over the next few weeks. I do have a couple of questions
though. First, there are quite a few changes in the Pod. Is this
simply whitespace fixes?

Ooops, my @​work vimrc, sorry but yes that must be just white space fixes

Second, do you have a simple test case that
can be included with Perl's tests for this problem?

I will hack one up soon, if you guys have not attempted to write one already

A separate patch was sent in to provide a TODO test. With the pp_hot.c changes above, the
TODO test passes. So, this patch applied with change #34833. Thanks!

@p5pRT
Copy link
Author

p5pRT commented Nov 14, 2008

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant