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

perl5db.pl noTTY=1 AutoTrace=1 cause problems #7840

Closed
p5pRT opened this issue Mar 19, 2005 · 6 comments
Closed

perl5db.pl noTTY=1 AutoTrace=1 cause problems #7840

p5pRT opened this issue Mar 19, 2005 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 19, 2005

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

Searchable as RT34489$

@p5pRT
Copy link
Author

p5pRT commented Mar 19, 2005

From at@altlinux.ru

Created by at@altlinux.org

I try to start Perl debugger as follows and get runtime error​:

$ PERLDB_OPTS="noTTY=1 AutoTrace=1" perl -dS -e1
Can't use an undefined value as a symbol reference at /usr/lib/perl5/perl5db.pl line 5378.
at /usr/lib/perl5/perl5db.pl line 5378
  DB​::print_lineinfo('main​::(-e​:1)​:\x{9}1\x{a}') called at /usr/lib/perl5/perl5db.pl line 2087 DB​::DB called at -e line 1
$

Note that each option taken apart does not expose the problem​:

$ PERLDB_OPTS="noTTY=1" perl -dS -e1
$ PERLDB_OPTS="AutoTrace=1" perl -dS -e1
Loading DB routines from perl5db.pl version 1.28
Editor support available.
...

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.8.6:

Configured by ALT Linux Team at Fri Mar 11 15:59:16 MSK 2005.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.4.20-alt7-up, archname=i386-linux-thread-multi
    uname='linux solemn.turbinal.org 2.4.20-alt7-up #1 fri mar 14 14:57:05 msk 2003 i686 unknown unknown gnulinux '
    config_args='-de -rs -Darchname=i386-linux -Dd_dosuid -Ud_csh -Dlibswanted=dl m c crypt db ndbm gdbm -Duseshrplib -Dlibperl=libperl.so.5.8 -Dcc=gcc -Doptimize=-pipe -Wall -Os -march=i686 -D_GNU_SOURCE -momit-leaf-frame-pointer -Dcccdlflags=-fPIC -DPIC -Dccdlflags=-rdynamic -Wl,-O1 -Dlddlflags=-shared -Wl,-O1 -Dldflags=-Wl,-O1 -Dprefix=/usr -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dvendorprefix=/usr -Dvendorlib=/usr/lib/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl/i386-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.6 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.6/i386-linux -Dsiteman1dir=/usr/local/man/man1 -Dsite_man3dir=/usr/local/man/man3 -Dcf_by=ALT Linux Team -Dcf_email=qa@altlinux.org -Dmyhostname=localhost -Dperladmin=root@localhost -Dmyuname=Linux 2.4.20-alt7-up i686 -Dnewmyuname=Linux 2.4.20-alt7-up i686 -Dinc_version_list=5.8.5/i386-linux 5.8.4/i386-linux 5.8.3/i386-linux 5.8.2/i386-linux 5.8.1/i386-linux 5.8.0/i386-linux 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0 -Dpager=/usr/bin/less -isR -Di_shadow -Di_syslog -Dusethreads -Duseithreads -Duselargefiles -Di_db -Di_gdbm -Di_ndbm -Di_sdbm -Ui_odbm'
    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=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-pipe -Wall -Os -march=i686 -D_GNU_SOURCE -momit-leaf-frame-pointer',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.3.3 20040412 (ALT Linux, build 3.3.3-alt5)', 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='gcc', ldflags ='-Wl,-O1 -L/usr/local/lib64 -L/usr/local/lib'
    libpth=/usr/local/lib64 /usr/local/lib /lib64 /usr/lib64 /lib /usr/lib
    libs=-ldl -lm -lpthread -lc -lcrypt -ldb -lgdbm
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so.5.8
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-O1'
    cccdlflags='-fPIC -DPIC', lddlflags='-shared -Wl,-O1 -L/usr/local/lib64 -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.6:
    /etc/perl5
    /usr/lib/perl5/i386-linux
    /usr/lib/perl5
    /usr/local/lib/perl5/site_perl/5.8.6/i386-linux
    /usr/local/lib/perl5/site_perl/5.8.6
    /usr/local/lib/perl5/site_perl/5.8.4/i386-linux
    /usr/local/lib/perl5/site_perl/5.8.2/i386-linux
    /usr/local/lib/perl5/site_perl/5.8.1/i386-linux
    /usr/local/lib/perl5/site_perl/5.8.4
    /usr/local/lib/perl5/site_perl/5.8.2
    /usr/local/lib/perl5/site_perl/5.8.1
    /usr/local/lib/perl5/site_perl/5.6.1
    /usr/local/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/i386-linux
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/vendor_perl
    .


Environment for perl v5.8.6:
    HOME=/home/at
    LANG=C
    LANGUAGE (unset)
    LC_COLLATE=ru_RU.CP1251
    LC_CTYPE=ru_RU.CP1251
    LC_MESSAGES=C
    LC_MONETARY=ru_RU.CP1251
    LC_NUMERIC=ru_RU.CP1251
    LC_TIME=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/at/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/games:/sbin:/usr/sbin:/usr/local/sbin:/usr/lib/qt3/bin
    PERL_BADLANG (unset)
    SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

From @jkeenan

On Sat Mar 19 02​:24​:27 2005, at@​altlinux.ru wrote​:

This is a bug report for perl from at@​altlinux.org,
generated with the help of perlbug 1.35 running under perl v5.8.6.

I try to start Perl debugger as follows and get runtime error​:

$ PERLDB_OPTS="noTTY=1 AutoTrace=1" perl -dS -e1
Can't use an undefined value as a symbol reference at
/usr/lib/perl5/perl5db.pl line 5378.
at /usr/lib/perl5/perl5db.pl line 5378
DB​::print_lineinfo('main​::(-e​:1)​:\x{9}1\x{a}') called at
/usr/lib/perl5/perl5db.pl line 2087 DB​::DB called at -e line
1
$

Note that each option taken apart does not expose the problem​:

$ PERLDB_OPTS="noTTY=1" perl -dS -e1
$ PERLDB_OPTS="AutoTrace=1" perl -dS -e1
Loading DB routines from perl5db.pl version 1.28
Editor support available.
...

When I used Perl 5.14.2 to run code very close to that provided by the
original poster, I got the same failure​:

#####
$ PERLDB_OPTS="noTTY=1 AutoTrace=1" perl -d -e 'print qq{hello world\n};'
Can't use an undefined value as a symbol reference at
/usr/local/lib/perl5/5.14.2/perl5db.pl line 5403.
at /usr/local/lib/perl5/5.14.2/perl5db.pl line 5403
  DB​::print_lineinfo('main​::(-e​:1)​:\x{9}print qq{hello
world\n};\x{a}') called at /usr/local/lib/perl5/5.14.2/perl5db.pl line 2111
  DB​::DB called at -e line 1
#####

But when I switched to blead and changed the command appropriately, I
had no failures but had slightly different results depending on which
variation of the OP's command I used​:

#####
$ PERLDB_OPTS="noTTY=1 AutoTrace=1" ./perl -Ilib -d -e 'print qq{hello
world\n};'
hello world

$ PERLDB_OPTS="noTTY=1" ./perl -Ilib -d -e 'print qq{hello world\n};'
hello world

$ PERLDB_OPTS="AutoTrace=1" ./perl -Ilib -d -e 'print qq{hello world\n};'

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

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

  DB<1> n
hello world
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.
  DB<1> q
#####

Is the debugger indeed behaving better in blead than in 5.14.2? (My Perl
-V for blead attached.)

Thank you very much.
Jim Keenan
 

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

From @jkeenan

Summary of my perl5 (revision 5 version 15 subversion 5) configuration​:
  Derived from​: c624397
  Ancestor​: 416e3a8
  Platform​:
  osname=darwin, osvers=8.11.0, archname=darwin-2level
  uname='darwin macintosh-8.local 8.11.0 darwin kernel version 8.11.0​: wed oct 10 18​:26​:00 pdt 2007; root​:xnu-792.24.17~1release_ppc power macintosh powerpc '
  config_args='-de -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  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 ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include',
  optimize='-O3',
  cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include'
  ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5250)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
  libpth=/usr/local/lib /opt/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lc
  perllibs=-ldl -lm -lc
  libc=, so=dylib, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_DEVEL
  USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
  USE_PERL_ATOF
  Locally applied patches​:
  uncommitted-changes
  c624397
  Built under darwin
  Compiled at Nov 30 2011 21​:47​:22
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.15.5/darwin-2level
  /usr/local/lib/perl5/site_perl/5.15.5
  /usr/local/lib/perl5/5.15.5/darwin-2level
  /usr/local/lib/perl5/5.15.5
  /usr/local/lib/perl5/site_perl
  .

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2011

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

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2016

From @dcollinsn

This was fixed by...

commit aa8c2dc
Author​: Shlomi Fish <shlomif@​shlomifish.org>
Date​: Sat Aug 10 10​:21​:16 2013 +0300

  Fix RT #41461 (with a test).

  A problem with the perl debugger of writing to an undef $LINEINFO.
  Bump $VERSION to 1.42.

  For​: RT #41461

:040000 040000 796a3b25bf90eca28c38c219b61fd710e699a5fd dc2a7ca390c23dcd215adf0c8d4e76e14b18cf96 M lib

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2016

@dcollinsn - 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