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

B::Concise and -tree produces mangled output #10899

Closed
p5pRT opened this issue Dec 12, 2010 · 6 comments
Closed

B::Concise and -tree produces mangled output #10899

p5pRT opened this issue Dec 12, 2010 · 6 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Dec 12, 2010

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

Searchable as RT80632$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

From @cpansprout

Some time between 5.8.3 and 5.8.4, the -tree output format started getting extra line breaks. I suppose if one squints hard enough it might still look like a tree.

Pint​:perl.git-copy sprout$ perl5.8.3 -MO=Concise,-tree -e '{ print;} '<9>leave[1 ref]-+-<1>enter
  |-<2>nextstate(main 2 -e​:1)
  `-<8>leaveloop-+-<3>enterloop(next->8 last->8 redo->4)
  `-lineseq-+-<4>nextstate(main 1 -e​:1)
  `-<7>print-+-<5>pushmark
  `-ex-rv2sv---<6>gvsv(*_)
-e syntax OK
Pint​:perl.git-copy sprout$ perl5.8.4 -MO=Concise,-tree -e '{ print;} '
<9>leave[1 ref]
-+-<1>enter

  |-<2>nextstate(main 2 -e​:1)

  `-<8>leaveloop
-+-<3>enterloop(next->8 last->8 redo->4)

  `-lineseq
-+-<4>nextstate(main 1 -e​:1)

  `-<7>print
-+-<5>pushmark

  `-ex-rv2sv
---<6>gvsv(*_)

-e syntax OK


Flags​:
  category=library
  severity=medium


This perlbug was built using Perl 5.10.1 - Thu Sep 24 18​:07​:44 PDT 2009
It is being executed now by Perl 5.8.4 - Thu Jun 12 14​:05​:58 PDT 2008.

Site configuration information for perl 5.8.4​:

Configured by sprout at Thu Jun 12 14​:05​:58 PDT 2008.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration​:
  Platform​:
  osname=darwin, osvers=9.3.0, archname=darwin-2level
  uname='darwin pint.local 9.3.0 darwin kernel version 9.3.0​: fri may 23 00​:49​:16 pdt 2008; root​:xnu-1228.5.18~1release_i386 i386 '
  config_args='-de'
  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 ='-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
  optimize='-O3',
  cppflags='-no-cpp-precomp -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
  ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  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'
  libpth=/usr/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lutil -lc
  perllibs=-ldl -lm -lutil -lc
  libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib'

Locally applied patches​:
 


@​INC for perl 5.8.4​:
  /usr/local/lib/perl5/5.8.4/darwin-2level
  /usr/local/lib/perl5/5.8.4
  /usr/local/lib/perl5/site_perl/5.8.4/darwin-2level
  /usr/local/lib/perl5/site_perl/5.8.4
  /usr/local/lib/perl5/site_perl/5.8.3/darwin-2level
  /usr/local/lib/perl5/site_perl/5.8.3
  /usr/local/lib/perl5/site_perl/5.8.1/darwin-2level
  /usr/local/lib/perl5/site_perl/5.8.1
  /usr/local/lib/perl5/site_perl/5.10.0
  /usr/local/lib/perl5/site_perl
  .


Environment for perl 5.8.4​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/sprout
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/bin​:/bin​:/usr/sbin​:/sbin​:/usr/local/bin​:/usr/X11/bin​:/usr/local/bin
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 13, 2010

From @rurban

Attached patch fixes -MO=Concise,-tree for blead.

Same fix should be applied back also.
--
Reini Urban

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 13, 2010

From @rurban

0001-Fix-perl-80632-MO-Concise-tree-format.patch
From fa71a7ff0911f9ed3c094ba836e136ecea077484 Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@x-ray.at>
Date: Mon, 13 Dec 2010 20:06:33 +0100
Subject: [PATCH] Fix [perl #80632] -MO=Concise,-tree format

Some time between 5.8.3 and 5.8.4, the -tree output
format started getting extra line breaks.
---
 ext/B/B/Concise.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 6d06956..fbc02ad 100644
--- a/ext/B/B/Concise.pm
+++ b/ext/B/B/Concise.pm
@@ -586,7 +586,7 @@ sub fmt_line {    # generate text-line for op.
     $text = "# $hr->{src}\n$text" if $show_src and $hr->{src};
 
     chomp $text;
-    return "$text\n" if $text ne "";
+    return "$text\n" if $text ne "" and $order ne "tree";
     return $text; # suppress empty lines
 }
 
-- 
1.7.2.3

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 13, 2010

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

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 17, 2010

From @cpansprout

On Mon Dec 13 11​:10​:48 2010, rurban wrote​:

Attached patch fixes -MO=Concise,-tree for blead.

Thank you. Applied as efef081.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 17, 2010

@cpansprout - 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant