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

PERLDB_OPTS="Frame=1 veryCompact" apparently broken since before 5.8.9 #12681

Open
p5pRT opened this issue Jan 1, 2013 · 13 comments
Open

PERLDB_OPTS="Frame=1 veryCompact" apparently broken since before 5.8.9 #12681

p5pRT opened this issue Jan 1, 2013 · 13 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 1, 2013

Migrated from rt.perl.org#116264 (status was 'open')

Searchable as RT116264$

@p5pRT
Copy link
Author

p5pRT commented Jan 1, 2013

From @kentfredric

# 5.8.9

PERLDB_OPTS="Frame=1 NonStop veryCompact" perl -d -e1

Can't use an undefined value as a symbol reference at
/home/webadmin/perl5/perlbrew/perls/perl-5.8.9/lib/5.8.9/perl5db.pl
line 5353.

Compilation failed in require.

at -e line 0

main​::BEGIN() called at
/home/webadmin/perl5/perlbrew/perls/perl-5.8.9/lib/5.8.9/perl5db.pl
line 0

eval {...} called at
/home/webadmin/perl5/perlbrew/perls/perl-5.8.9/lib/5.8.9/perl5db.pl
line 0

BEGIN failed--compilation aborted.

at -e line 0

# 5.16.2

PERLDB_OPTS="Frame=1 NonStop veryCompact" perl -d -E1

Can't use an undefined value as a symbol reference at
/home/webadmin/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/perl5db.pl
line 5316.

Compilation failed in require.

at -e line 0.

main​::BEGIN() called at -e line 0

eval {...} called at -e line 0

BEGIN failed--compilation aborted.

at -e line 0.

# 5.17.7

PERLDB_OPTS="Frame=1 NonStop veryCompact" perl -d -e1

Variable "$doret" is not imported at (eval
4)[/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl​:7318]
line 3.

at (eval 4)[/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl​:7318]
line 3.

eval '

local $frame = 0;

local $doret = -2;

require \'dumpvar.pl\';

1;

' called at /home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl
line 7318

DB​::parse_options('Frame=1 NonStop veryCompact') called at
/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl
line 1304

require perl5db.pl called at -e line 0

main​::BEGIN() called at (eval
4)[/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl​:7318]
line 3

eval {...} called at (eval
4)[/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl​:7318]
line 3

Global symbol "$doret" requires explicit package name at (eval
4)[/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/perl5db.pl​:7318]
line 3.

Compilation failed in require.

at -e line 0.

main​::BEGIN() called at -e line 0

eval {...} called at -e line 0

BEGIN failed--compilation aborted.

at -e line 0.


Flags​:
  category=utilities
  severity=medium


Site configuration information for perl 5.17.7​:

Configured by kent at Wed Dec 19 13​:06​:58 NZDT 2012.

Summary of my perl5 (revision 5 version 17 subversion 7) configuration​:

  Platform​:
  osname=linux, osvers=3.7.0-1-arch, archname=x86_64-linux
  uname='linux plasma 3.7.0-1-arch #1 smp preempt tue dec 11
15​:05​:50 cet 2012 x86_64 gnulinux '
  config_args='-de
-Dprefix=/home/webadmin/perl5/perlbrew/perls/perl-5.17.7 -Dusedevel
-Aeval​:scriptdir=/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/bin'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.7.2', 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 =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=/lib/libc-2.16.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.16'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'

Locally applied patches​:


@​INC for perl 5.17.7​:
  /home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/site_perl/5.17.7/x86_64-linux
  /home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/site_perl/5.17.7
  /home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7/x86_64-linux
  /home/webadmin/perl5/perlbrew/perls/perl-5.17.7/lib/5.17.7
  .


Environment for perl 5.17.7​:
  HOME=/ext/graft/home/webadmin
  LANG=C
  LANGUAGE (unset)
  LC_COLLATE=C
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/webadmin/perl5/perlbrew/bin​:/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/usr/bin/vendor_perl​:/usr/bin/core_perl
  PERLBREW_BASHRC_VERSION=0.46
  PERLBREW_HOME=/ext/graft/home/webadmin/.perlbrew
  PERLBREW_MANPATH=/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/man
  PERLBREW_PATH=/home/webadmin/perl5/perlbrew/bin​:/home/webadmin/perl5/perlbrew/perls/perl-5.17.7/bin
  PERLBREW_PERL=perl-5.17.7
  PERLBREW_ROOT=/home/webadmin/perl5/perlbrew
  PERLBREW_VERSION=0.46
  PERL_BADLANG (unset)
  SHELL=/bin/bash

--
Kent

@p5pRT
Copy link
Author

p5pRT commented Aug 24, 2013

From kevin@dawson10.plus.com

#116264​: PERLDB_OPTS="Frame=1 veryCompact" apparently broken since
before 5.8.9

https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=116264

inc tests​:

$ LD_LIBRARY_PATH=$PWD ./perl -I$PWD/lib utils/prove -l lib/perl5db.t
lib/perl5db.t .. ok
All tests successful.
Files=1, Tests=119, 11 wallclock secs ( 0.06 usr 0.01 sys + 8.83 cusr
0.72 csys = 9.62 CPU)
Result​: PASS

regards
kevin

ps if this is the wrong way of submitting this patch please advise​:

@p5pRT
Copy link
Author

p5pRT commented Aug 24, 2013

From kevin@dawson10.plus.com

0001-fix-for-perlbug-116264-bowtie.patch
From 21b7fd963f35ddd704047e6316dc97bcbd4acd5b Mon Sep 17 00:00:00 2001
From: kevin dawson <bowtie@cpan.org>
Date: Sat, 24 Aug 2013 20:14:34 +0100
Subject: [PATCH] fix for perlbug #116264 (bowtie)

---
 lib/perl5db.pl | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index ab82616..68aa492 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -7479,12 +7479,7 @@ sub parse_options {
 
         # Load any module that this option requires.
         if ( defined($optionRequire{$option}) && defined($val) ) {
-            eval qq{
-            local \$frame = 0;
-            local \$doret = -2;
-            require '$optionRequire{$option}';
-            1;
-            } || die $@   # XXX: shouldn't happen
+            eval { require $optionRequire{$option} } || die $@ # XXX: shouldn't happen
         }
 
         # Set it.
-- 
1.8.1.2

@p5pRT
Copy link
Author

p5pRT commented Aug 24, 2013

From @cpansprout

On Sat Aug 24 12​:24​:21 2013, kevin@​dawson10.plus.com wrote​:

ps if this is the wrong way of submitting this patch please advise​:

It’s fine, but if you could put [perl #116264] in the subject line it
will get appended to the right ticket automatically. I’ll merge the two
tickets....

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Aug 24, 2013

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

@p5pRT
Copy link
Author

p5pRT commented Aug 25, 2013

From kevin@dawson10.plus.com

Added an additional test for previous patch

0002-Add-test-for-116264-bowtie.patch

regards
kevin

@p5pRT
Copy link
Author

p5pRT commented Aug 25, 2013

From kevin@dawson10.plus.com

0002-Add-test-for-116264-bowtie.patch
From 362bdde6fdf6d31294bb38f7ced47cc300f56b74 Mon Sep 17 00:00:00 2001
From: kevin dawson <bowtie@cpan.org>
Date: Sun, 25 Aug 2013 20:23:06 +0100
Subject: [PATCH 2/2] Add test for #116264 (bowtie)

---
 lib/perl5db.t | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/perl5db.t b/lib/perl5db.t
index 17fa744..13356f7 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -29,7 +29,7 @@ BEGIN {
     $ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
 }
 
-plan(119);
+plan(121);
 
 my $rc_filename = '.perldb';
 
@@ -116,7 +116,14 @@ EOF
     is( $?, 0, '[perl #41461] frame=2 noTTY does not crash debugger, exit == 0' );
     like( $output, 'success' , '[perl #41461] code is run' );
 }
-
+# [ perl #116264] frame=1 NonStop veryCompact
+{
+    local $ENV{PERLDB_OPTS} = "frame=1 NonStop veryCompact";
+    rc('');
+    my $output = runperl( switches => [ '-d' ], prog => 'print q{success}' );
+    is( $?, 0, '[perl #116264] frame=1 NonStop veryCompact does not crash debugger, exit == 0' );
+    like( $output, 'success' , '[perl #116264] code is run' );
+}
 package DebugWrap;
 
 sub new {
-- 
1.8.1.2

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2013

From @jkeenan

On Sat Aug 24 12​:24​:21 2013, kevin@​dawson10.plus.com wrote​:

#116264​: PERLDB_OPTS="Frame=1 veryCompact" apparently broken since
before 5.8.9

https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=116264

inc tests​:

$ LD_LIBRARY_PATH=$PWD ./perl -I$PWD/lib utils/prove -l lib/perl5db.t
lib/perl5db.t .. ok
All tests successful.
Files=1, Tests=119, 11 wallclock secs ( 0.06 usr 0.01 sys + 8.83 cusr
0.72 csys = 9.62 CPU)
Result​: PASS

regards
kevin

When I apply your first patch to blead, then modify the OP's command to
run on blead, this is what I get​:

#####
$ PERLDB_OPTS="Frame=1 NonStop veryCompact" ./perl -Ilib -d -e 1
Package -e.
  entering DB​::Obj​::_init
#####

Is that what I *should* be getting?

I get that same message after applying your second patch as well, then
again calling the command above.

With one exception, all tests pass, but since I don't know enough about
the debugger to explain what "Frame=1 NonStop veryCompact" means, I'm
going to ask that others more knowledgeable give it further review.

The one test failure suggests that lib/perl5db.pl will need an increment
to its version number.

#####
$ cd t;./perl harness -v porting/cmp_version.t | grep 'not ok'; cd -not
ok 21 - lib/perl5db.pl
/home/jkeenan/perl
#####

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2013

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

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2013

From kevin@dawson10.plus.com

On 26/08/13 01​:28, James E Keenan via RT wrote​:

On Sat Aug 24 12​:24​:21 2013, kevin@​dawson10.plus.com wrote​:

#116264​: PERLDB_OPTS="Frame=1 veryCompact" apparently broken since
before 5.8.9

https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=116264

inc tests​:

$ LD_LIBRARY_PATH=$PWD ./perl -I$PWD/lib utils/prove -l lib/perl5db.t
lib/perl5db.t .. ok
All tests successful.
Files=1, Tests=119, 11 wallclock secs ( 0.06 usr 0.01 sys + 8.83 cusr
0.72 csys = 9.62 CPU)
Result​: PASS

regards
kevin

When I apply your first patch to blead, then modify the OP's command to
run on blead, this is what I get​:

#####
$ PERLDB_OPTS="Frame=1 NonStop veryCompact" ./perl -Ilib -d -e 1
Package -e.
entering DB​::Obj​::_init
#####
attached patch for above, sorry
Is that what I *should* be getting?

I get that same message after applying your second patch as well, then
again calling the command above.

With one exception, all tests pass, but since I don't know enough about
the debugger to explain what "Frame=1 NonStop veryCompact" means, I'm
going to ask that others more knowledgeable give it further review.

The one test failure suggests that lib/perl5db.pl will need an increment
to its version number.
I was just adding a test as I have just read perlhack

#####
$ cd t;./perl harness -v porting/cmp_version.t | grep 'not ok'; cd -not
ok 21 - lib/perl5db.pl
/home/jkeenan/perl
#####

Thank you very much.
Jim Keenan

this was initially tested as​:

$ PERLDB_OPTS="frame=0 NonStop veryCompact" LD_LIBRARY_PATH=$PWD ./perl
-I$PWD/lib -d -e1
$

so I had another look at lin/perl5db.t

hence the additional patch

regards
kevin

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2013

From kevin@dawson10.plus.com

0003-Add-test-for-116264-bowtie.patch
From dfc6d96955cc65998718e999629585eb989b6926 Mon Sep 17 00:00:00 2001
From: kevin dawson <bowtie@cpan.org>
Date: Mon, 26 Aug 2013 11:18:41 +0100
Subject: [PATCH 3/3] Add test for 116264 (bowtie)

---
 lib/perl5db.t | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/perl5db.t b/lib/perl5db.t
index 13356f7..31b9160 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -111,7 +111,6 @@ EOF
 # [ perl #41461] Frame=2 noTTY
 {
     local $ENV{PERLDB_OPTS} = "frame=2 noTTY nonstop";
-    rc('');
     my $output = runperl( switches => [ '-d' ], prog => 'print q{success}' );
     is( $?, 0, '[perl #41461] frame=2 noTTY does not crash debugger, exit == 0' );
     like( $output, 'success' , '[perl #41461] code is run' );
@@ -119,7 +118,6 @@ EOF
 # [ perl #116264] frame=1 NonStop veryCompact
 {
     local $ENV{PERLDB_OPTS} = "frame=1 NonStop veryCompact";
-    rc('');
     my $output = runperl( switches => [ '-d' ], prog => 'print q{success}' );
     is( $?, 0, '[perl #116264] frame=1 NonStop veryCompact does not crash debugger, exit == 0' );
     like( $output, 'success' , '[perl #116264] code is run' );
-- 
1.8.1.2

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2013

From SmithCW@familysearch.org

Unsubscribe

Sent from my iPhone

On Aug 25, 2013, at 6​:28 PM, "James E Keenan via RT" <perlbug-followup@​perl.org> wrote​:

On Sat Aug 24 12​:24​:21 2013, kevin@​dawson10.plus.com wrote​:

#116264​: PERLDB_OPTS="Frame=1 veryCompact" apparently broken since
before 5.8.9

https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=116264

inc tests​:

$ LD_LIBRARY_PATH=$PWD ./perl -I$PWD/lib utils/prove -l lib/perl5db.t
lib/perl5db.t .. ok
All tests successful.
Files=1, Tests=119, 11 wallclock secs ( 0.06 usr 0.01 sys + 8.83 cusr
0.72 csys = 9.62 CPU)
Result​: PASS

regards
kevin

When I apply your first patch to blead, then modify the OP's command to
run on blead, this is what I get​:

#####
$ PERLDB_OPTS="Frame=1 NonStop veryCompact" ./perl -Ilib -d -e 1
Package -e.
entering DB​::Obj​::_init
#####

Is that what I *should* be getting?

I get that same message after applying your second patch as well, then
again calling the command above.

With one exception, all tests pass, but since I don't know enough about
the debugger to explain what "Frame=1 NonStop veryCompact" means, I'm
going to ask that others more knowledgeable give it further review.

The one test failure suggests that lib/perl5db.pl will need an increment
to its version number.

#####
$ cd t;./perl harness -v porting/cmp_version.t | grep 'not ok'; cd -not
ok 21 - lib/perl5db.pl
/home/jkeenan/perl
#####

Thank you very much.
Jim Keenan

---
via perlbug​: queue​: perl5 status​: new
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=116264

NOTICE​: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2013

From @tonycoz

On Sun Aug 25 17​:28​:08 2013, jkeenan wrote​:

On Sat Aug 24 12​:24​:21 2013, kevin@​dawson10.plus.com wrote​:

#116264​: PERLDB_OPTS="Frame=1 veryCompact" apparently broken since
before 5.8.9

https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=116264

inc tests​:

$ LD_LIBRARY_PATH=$PWD ./perl -I$PWD/lib utils/prove -l lib/perl5db.t
lib/perl5db.t .. ok
All tests successful.
Files=1, Tests=119, 11 wallclock secs ( 0.06 usr 0.01 sys + 8.83
cusr
0.72 csys = 9.62 CPU)
Result​: PASS

regards
kevin

When I apply your first patch to blead, then modify the OP's command to
run on blead, this is what I get​:

#####
$ PERLDB_OPTS="Frame=1 NonStop veryCompact" ./perl -Ilib -d -e 1
Package -e.
entering DB​::Obj​::_init
#####

Is that what I *should* be getting?

I get that same message after applying your second patch as well, then
again calling the command above.

With one exception, all tests pass, but since I don't know enough about
the debugger to explain what "Frame=1 NonStop veryCompact" means, I'm
going to ask that others more knowledgeable give it further review.

The one test failure suggests that lib/perl5db.pl will need an increment
to its version number.

You shouldn't be getting that, but it doesn't appear to be the fault of
this patch.

For example, blead​:

tony@​mars​:.../git/perl2$ PERLDB_OPTS="Frame=15" ./perl -Ilib -d -e1

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

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

Package -e.
  in .=DB​::Obj​::_init('DB​::Obj=HASH(0x9dacc8)', 'HASH(0x9da608)') from
lib/perl5db.pl​:3166
out .=DB​::Obj​::_init('DB​::Obj=HASH(0x9dacc8)', 'HASH(0x9da608)') from
lib/perl5db.pl​:3166
(many lines omitted)
out .=DB​::print_lineinfo(' ', '1​:^I1^J') from lib/perl5db.pl​:3251
out .=DB​::Obj​::_my_print_lineinfo('DB​::Obj=HASH(0x9dacc8)', 1,
'main​::(-e​:1)​:^I1^J') from lib/perl5db.pl​:3343
  DB<1>

5.14.2​:

tony@​mars​:.../git/perl2$ PERLDB_OPTS="Frame=15" perl -d -e1

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

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

Package -e.
1​: 1
  DB<1>

I'm a bit concerned about losing the initializations of $frame and
$doret, but haven't been able to find a case where it makes a difference.

Tony

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

2 participants