A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Perl/perl5/issues/17254 below:

use strict; broken in some situations in 5.28+ · Issue #17254 · Perl/perl5 · GitHub

Description
In a narrow situation, use strict allows some undeclared names to be used as string literals, when it previously didn't in pre-5.28 releases. This was initially reported by Lintian maintainer Felix Lechner on IRC earlier today. Ether did some digging and found that it was introduced in 5.27.6 and has given a guess that it's related to OP_MULTICONCAT but no bisection has happened yet to confirm this.

Steps to Reproduce
Reproduces: perl -wle'use strict; use warnings; sub foo { "foo" }; print foo() . SLASH . "bar"'
Doesn't Reproduce: perl -wle'use strict; use warnings; print "foo" . SLASH . "bar"'

Expected behavior
There should be an error from use strict about the use of SLASH in this manner

Perl configuration

Summary of my perl5 (revision 5 version 28 subversion 2) configuration:
   
  Platform:
    osname=linux
    osvers=5.1.11-x86_64-linode127
    archname=x86_64-linux
    uname='linux simcop2387.info 5.1.11-x86_64-linode127 #1 smp preempt mon jun 17 21:18:26 utc 2019 x86_64 gnulinux '
    config_args='-Dprefix=/home/perlbot/perl5/custom/5.28.2 -de -Dusedevel -Duseshrplib -Dusemymalloc=y -Accflags=-fpie -fPIC -mtune=native -fstack-protector-all -pie -D_FORTIFY_SOURCE=2 -ggdb  -DPERL_EMERGENCY_SBRK -Aldflags=-Wl,-z,now -Wl,-zrelro -Wl,-z,noexecstack -A'eval:scriptdir=/home/perlbot/perl5/custom/5.28.2/bin''
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=y
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fpie -fPIC -mtune=native -fstack-protector-all -pie -D_FORTIFY_SOURCE=2 -ggdb -DPERL_EMERGENCY_SBRK -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2'
    cppflags='-fpie -fPIC -mtune=native -fstack-protector-all -pie -D_FORTIFY_SOURCE=2 -ggdb -DPERL_EMERGENCY_SBRK -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='8.3.0'
    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 =' -Wl,-z,now -Wl,-zrelro -Wl,-z,noexecstack -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/8/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
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.28.so
    so=so
    useshrplib=true
    libperl=libperl.so
    gnulibc_version='2.28'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E -Wl,-rpath,/home/perlbot/perl5/custom/5.28.2/lib/5.28.2/x86_64-linux/CORE'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    MYMALLOC
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Locally applied patches:
    Devel::PatchPerl 1.64
  Built under linux
  Compiled at Aug 23 2019 17:24:22
  %ENV:
    PERLBREW_HOME="/home/ryan/.perlbrew"
    PERLBREW_MANPATH="/home/ryan/perl5/perlbrew/perls/perlbot-mainbot/man"
    PERLBREW_PATH="/home/ryan/perl5/perlbrew/bin:/home/ryan/perl5/perlbrew/perls/perlbot-mainbot/bin"
    PERLBREW_PERL="perlbot-mainbot"
    PERLBREW_ROOT="/home/ryan/perl5/perlbrew"
    PERLBREW_SHELLRC_VERSION="0.84"
    PERLBREW_VERSION="0.84"
  @INC:
    /home/perlbot/perl5/custom/5.28.2/lib/site_perl/5.28.2/x86_64-linux
    /home/perlbot/perl5/custom/5.28.2/lib/site_perl/5.28.2
    /home/perlbot/perl5/custom/5.28.2/lib/5.28.2/x86_64-linux
    /home/perlbot/perl5/custom/5.28.2/lib/5.28.2

On IRC ether did a bit of diagnosis and work to try to identify what happened:

13:41:12 < ether> looks like it happened between 5.27.5 and 5.27.6. to get down to the exact commit requires a bisection in blead
13:41:24 < simcop2387> ether++
13:41:37 < ether> 5.27.6 was my release hangs head
...
13:42:49 < ether> demonstrates the issue: perl -wle'use strict; use warnings; sub foo { "foo" }; print foo() . SLASH . "bar"'
13:42:56 < ether> does not : perl -wle'use strict; use warnings; print "foo" . SLASH . "bar"'
13:43:16 < ether> so it's something peculiar in how the sub is parsed
...
13:48:04 < ether> 5.27.6 contained the first set of changes for OP_MULTICONCAT -- I bet it happened in there
13:48:28 < simcop2387> ether: that makes sense, that changed how a lot of the parsing went to optimize it right?
13:48:38 < ether> yup


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4