Skip Menu |
Report information
Id: 132764
Status: new
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: kes-kes [at] yandex.ru
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: 5.24.0
Fixed In: (no value)



Date: Thu, 25 Jan 2018 13:16:29 +0200
From: KES <kes-kes [...] yandex.ru>
Subject: Devel::Peek: Indentation gap when dumping MG object
To: perlbug <perlbug [...] perl.org>
Download (untitled) / with headers
text/plain 5.3k
Message-Id: <5.24.0_11686_1516878441@work> To: perlbug@perl.org Reply-To: kes-kes@yandex.ru Cc: kes-kes@yandex.ru From: kes-kes@yandex.ru Subject: Devel::Peek: Indentation gap when dumping MG object This is a bug report for perl from kes-kes@yandex.ru, generated with the help of perlbug 1.40 running under perl 5.24.0. ----------------------------------------------------------------- [Please describe your issue here] Depending on the PL_dumpindent the MG_OBJ details are dumped with indentation gap: Look at output: PL_dumpindent = 1; SV = PVMG(0x1d74a70) at 0x1bba790 REFCNT = 1 FLAGS = (GMG,SMG,RMG) IV = 0 NV = 0 PV = 0 MAGIC = 0x1bb3bd0 MG_VIRTUAL = &PL_vtbl_packelem MG_TYPE = PERL_MAGIC_tiedscalar(q) MG_FLAGS = 0x02 REFCOUNTED MG_OBJ = 0x1baffe8 SV = IV(0x1baffd8) at 0x1baffe8 ^^ REFCNT = 1 FLAGS = (ROK) RV = 0x1c778b8 SV = PVHV(0x1ba1c60) at 0x1c778b8 ^^ ... PL_dumpindent = 2; SV = PVMG(0x21aa9d0) at 0x1ff0790 REFCNT = 1 FLAGS = (GMG,SMG,RMG) IV = 0 NV = 0 PV = 0 MAGIC = 0x1fe9b90 MG_VIRTUAL = &PL_vtbl_packelem MG_TYPE = PERL_MAGIC_tiedscalar(q) MG_FLAGS = 0x02 REFCOUNTED MG_OBJ = 0x1fe5fe8 SV = IV(0x1fe5fd8) at 0x1fe5fe8 ^^ REFCNT = 1 FLAGS = (ROK) RV = 0x21a90e8 SV = PVHV(0x1fd7c60) at 0x21a90e8 ^^ ... PL_dumpindent = 3; SV = PVMG(0x15999c0) at 0x13df790 REFCNT = 1 FLAGS = (GMG,SMG,RMG) IV = 0 NV = 0 PV = 0 MAGIC = 0x13d8b90 MG_VIRTUAL = &PL_vtbl_packelem MG_TYPE = PERL_MAGIC_tiedscalar(q) MG_FLAGS = 0x02 REFCOUNTED MG_OBJ = 0x13d4fe8 SV = IV(0x13d4fd8) at 0x13d4fe8 ^^ REFCNT = 1 FLAGS = (ROK) RV = 0x16c8098 SV = PVHV(0x13c6c60) at 0x16c8098 ^^ So this is unclear where SV belons to Is it belongs to MAGIC or MG_OBJ? There is no any documentation about PL_dumpindent [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.24.0: Configured by kes at Wed Oct 19 14:07:47 EEST 2016. Summary of my perl5 (revision 5 version 24 subversion 0) configuration: Platform: osname=linux, osvers=4.4.0-43-generic, archname=x86_64-linux uname='linux work 4.4.0-43-generic #63-ubuntu smp wed oct 12 13:48:03 utc 2016 x86_64 x86_64 x86_64 gnulinux ' config_args='-de -Dprefix=/home/kes/perl5/perlbrew/perls/perl-5.24.0 -Aeval:scriptdir=/home/kes/perl5/perlbrew/perls/perl-5.24.0/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='5.4.0 20160609', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 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-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64 libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.23.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.23' 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-strong' Locally applied patches: Devel::PatchPerl 1.38 --- @INC for perl 5.24.0: /home/kes/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux /home/kes/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0 /home/kes/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux /home/kes/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0 . --- Environment for perl 5.24.0: HOME=/home/kes LANG=en_US.UTF-8 LANGUAGE=en LC_ADDRESS=uk_UA.UTF-8 LC_IDENTIFICATION=uk_UA.UTF-8 LC_MEASUREMENT=uk_UA.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_MONETARY=uk_UA.UTF-8 LC_NAME=uk_UA.UTF-8 LC_NUMERIC=uk_UA.UTF-8 LC_PAPER=uk_UA.UTF-8 LC_TELEPHONE=uk_UA.UTF-8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/kes/perl5/perlbrew/bin:/home/kes/perl5/perlbrew/perls/perl-5.24.0/bin:/home/kes/bin:/home/kes/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PERLBREW=command perlbrew PERLBREW_BASHRC_VERSION=0.78 PERLBREW_HOME=/home/kes/.perlbrew PERLBREW_MANPATH=/home/kes/perl5/perlbrew/perls/perl-5.24.0/man PERLBREW_PATH=/home/kes/perl5/perlbrew/bin:/home/kes/perl5/perlbrew/perls/perl-5.24.0/bin PERLBREW_PERL=perl-5.24.0 PERLBREW_ROOT=/home/kes/perl5/perlbrew PERLBREW_VERSION=0.78 PERL_BADLANG (unset) SHELL=/bin/bash
RT-Send-CC: perl5-porters [...] perl.org
Another example of ambiguity: SV = IV(0x2598d20) at 0x2598d30 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x25a3840 SV = PVCV(0x2597c28) at 0x25a3840 REFCNT = 3 FLAGS = () COMP_STASH = 0x2583ff8 "main" START = 0x25aae40 ===> 1 ROOT = 0x27842f0 GVGV::GV = 0x25a3660 "main" :: "t" FILE = "/home/kes/tmp/t3.pl" DEPTH = 1 FLAGS = 0x0 OUTSIDE_SEQ = 2000 PADLIST = 0x2774220 PADNAME = 0x27d2970(0x27e0410) PAD = 0x25a36c0(0x26ba700) 3. 0x2743170<1> (2001,2002) "$x" OUTSIDE = 0x25843d0 (MAIN) Here we can think that PADNAME is member of PVCV. But from the next out we can understand that PADNAME is child for PADLIST: SV = PVCV(0x2597c28) at 0x25a3840 REFCNT = 2 FLAGS = () COMP_STASH = 0x2583ff8 "main" START = 0x25aae40 ===> 1 ROOT = 0x27842f0 GVGV::GV = 0x25a3660 "main" :: "t" FILE = "/home/kes/tmp/t3.pl" DEPTH = 1 FLAGS = 0x0 OUTSIDE_SEQ = 2000 PADLIST = 0x2774220 PADNAME = 0x27d2970(0x27e0410) PAD = 0x25a36c0(0x26ba700) 3. 0x2743170<1> (2001,2002) "$x" OUTSIDE = 0x25843d0 (MAIN)
Also there are different defaults for PL_dumpindent when dumping from perl script and from XS


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org