Skip to content

Blead Breaks CPAN: TIMB/Geo-StreetAddress-US-1.04.tar.gz #16385

Description

@p5pRT

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

Searchable as RT132772$

Activity

  1. p5pRT commented on Jan 26, 2018

    @p5pRT
    Author

    From @eserte

    This is a bug report for perl from slaven@​rezic.de,
    generated with the help of perlbug 1.41 running under perl 5.27.8.


    The Geo-StreetAddress-US-1.04 started to segfault while running
    the test suite​:

      t/01_parser.t (Wstat​: 139 Tests​: 5 Failed​: 0)
      Non-zero wait status​: 139

    On some (linux) systems it may be just an error message​:

      Can't use an undefined value as a HASH reference

    Andreas bisected and found v5.27.5-166-ge839e6ed99 (which
    is RT #132385) and v5.27.5-203-g98d1c64ef9 as possible
    problem points.



    Flags​:
      category=core
      severity=low


    Site configuration information for perl 5.27.8​:

    Configured by eserte at Sat Jan 20 09​:22​:10 CET 2018.

    Summary of my perl5 (revision 5 version 27 subversion 8) configuration​:
     
      Platform​:
      osname=linux
      osvers=3.16.0-4-amd64
      archname=x86_64-linux
      uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-12-13) x86_64 gnulinux '
      config_args='-ds -e -Dprefix=/opt/perl-5.27.8 -Dusedevel -Dusemallocwrap=no -Dcf_email=srezic@​cpan.org'
      hint=recommended
      useposix=true
      d_sigaction=define
      useithreads=undef
      usemultiplicity=undef
      use64bitint=define
      use64bitall=define
      uselongdouble=undef
      usemymalloc=n
      default_inc_excludes_dot=define
      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 -D_FORTIFY_SOURCE=2'
      optimize='-O2'
      cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
      ccversion=''
      gccversion='4.9.2'
      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/4.9/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
      libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
      perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
      libc=libc-2.19.so
      so=so
      useshrplib=false
      libperl=libperl.a
      gnulibc_version='2.19'
      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'


    @​INC for perl 5.27.8​:
      /opt/perl-5.27.8/lib/site_perl/5.27.8/x86_64-linux
      /opt/perl-5.27.8/lib/site_perl/5.27.8
      /opt/perl-5.27.8/lib/5.27.8/x86_64-linux
      /opt/perl-5.27.8/lib/5.27.8


    Environment for perl 5.27.8​:
      HOME=/home/eserte
      LANG=en_US.UTF-8
      LANGUAGE (unset)
      LD_LIBRARY_PATH (unset)
      LOGDIR (unset)
      PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/home/eserte/bin/linux-gnu​:/home/eserte/bin/sh​:/home/eserte/bin​:/home/eserte/bin/pistachio-perl/bin​:/usr/games​:/home/eserte/devel
      PERLDOC=-MPod​::Perldoc​::ToTextOverstrike
      PERL_BADLANG (unset)
      SHELL=/bin/zsh

  2. p5pRT commented on Jan 27, 2018

    @p5pRT
    Author

    From @iabyn

    On Fri, Jan 26, 2018 at 12​:36​:12PM -0800, slaven@​rezic.de wrote​:

    The Geo-StreetAddress-US-1.04 started to segfault while running
    the test suite​:

    t/01\_parser\.t \(Wstat​: 139 Tests​: 5 Failed​: 0\)
      Non\-zero wait status​: 139
    

    It reduces to this​:

      my $a = "A";
      my $s = "A";
      $s =~ /$a(?{ $_."X" })/;

    It needs a run-time-compiled pattern with a code block which contains
    a multiconcat op.

    I'm looking further into this now.

    --
    The crew of the Enterprise encounter an alien life form which is
    surprisingly neither humanoid nor made from pure energy.
      -- Things That Never Happen in "Star Trek" #22

  3. p5pRT commented on Jan 27, 2018

    @p5pRT
    Author

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

  4. p5pRT commented on Feb 20, 2018

    @p5pRT
    Author

    From @iabyn

    On Sat, Jan 27, 2018 at 02​:51​:05PM +0000, Dave Mitchell wrote​:

    On Fri, Jan 26, 2018 at 12​:36​:12PM -0800, slaven@​rezic.de wrote​:

    The Geo-StreetAddress-US-1.04 started to segfault while running
    the test suite​:

    t/01\_parser\.t \(Wstat​: 139 Tests​: 5 Failed​: 0\)
      Non\-zero wait status​: 139
    

    It reduces to this​:

    my $a = "A";
    my $s = "A";
    $s =~ /$a\(?\{ $\_\."X" \}\)/;
    

    It needs a run-time-compiled pattern with a code block which contains
    a multiconcat op.

    I'm looking further into this now.

    Now fixed with​:

    commit 8327fe9
    Author​: David Mitchell <davem@​iabyn.com>
    AuthorDate​: Mon Feb 19 21​:32​:36 2018 +0000
    Commit​: David Mitchell <davem@​iabyn.com>
    CommitDate​: Mon Feb 19 22​:06​:49 2018 +0000

      multiconcat​: /$a(?{ $b . "c" })/ could crash
     
      RT #132772
     
      Due to the weird order in which codeblocks within patterns are optimised,
      it was possible for the OP_CONCAT -> OP_MULTICONCAT optimisation to leave
      freed ops in the op execution chain, leading to assertion failures or
      crashes.
     
      In particular, optimize_optree() needs to always be called before
      CALL_PEEP(), otherwise the individual subtrees which make up the two
      children of a concat op may not have the head of subtree as the last op in
      the subtree's op_next chain​: in the subtree
     
      RV2SV
      |
      GV
     
      this subtree gets peephole-optimised to
     
      ex-RV2SV
      |
      GVSV
     
      and GVSV->op_next no longer points to the ex-RV2SV but rather directly
      to RV2SV->op_next. But S_maybe_multiconcat() assumes that the head of each
      subtree is the last op to be executed​: It updates RV2SV->op_next when
      reorganising the optree, but leaves GVSV->op_next possibly pointing at a
      freed op.
     
      This commit provides a minimal fix by unconditionally calling
      optimize_optree() on each code block in Perl_pmruntime(). This may
      mean that optimize_optree() may be run against the same code block again
      later, but apart from the slight inefficiency, this should be harmless.
     
      A more general fix will be applied post 5.28.0 release.

    --
    Never work with children, animals, or actors.

  5. p5pRT commented on Feb 20, 2018

    @p5pRT
    Author

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions