Skip to content

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

Closed

Description

@p5pRT

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

Searchable as RT80632$

Activity

  1. p5pRT commented on Dec 12, 2010

    @p5pRT
    Author

    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

  2. p5pRT commented on Dec 13, 2010

    @p5pRT
    Author

    From @rurban

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

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

  3. p5pRT commented on Dec 13, 2010

    @p5pRT
    Author

    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
    
    
  4. p5pRT commented on Dec 13, 2010

    @p5pRT
    Author

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

  5. p5pRT commented on Dec 17, 2010

    @p5pRT
    Author

    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.

  6. p5pRT commented on Dec 17, 2010

    @p5pRT
    Author

    @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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions