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

Bleadperl v5.25.0-40-ga52f2cc breaks GAAS/perl-lisp-0.06.tar.gz #15380

Closed
p5pRT opened this issue Jun 2, 2016 · 7 comments
Closed

Bleadperl v5.25.0-40-ga52f2cc breaks GAAS/perl-lisp-0.06.tar.gz #15380

p5pRT opened this issue Jun 2, 2016 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 2, 2016

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

Searchable as RT128307$

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2016

From @andk

bisect


commit a52f2cc
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Wed Jun 27 23​:34​:04 2012 +0200

  Validate the 'require Bare​::Word' pathname.

rt.cpan


https://rt.cpan.org/Ticket/Display.html?id=114635

perl -V


Summary of my perl5 (revision 5 version 25 subversion 1) configuration​:
  Commit id​: fcd1306
  Platform​:
  osname=linux, osvers=4.3.0-1-amd64, archname=x86_64-linux-thread-multi
  uname='linux k83 4.3.0-1-amd64 #1 smp debian 4.3.3-7 (2016-01-19) x86_64 gnulinux '
  config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.25.0-48-gfcd1306/f7bf -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Dlibswanted=cl pthread socket inet nsl gdbm dbm malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat -Duseithreads -Uuselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -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 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion='', gccversion='5.3.1 20160121', 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
  libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.21.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.21'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL
  USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
  USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at May 10 2016 23​:52​:47
  %ENV​:
  PERL5LIB="/tmp/loop_over_bdir-31517-i9L6PE/FusionInventory-Agent-2.3.17-0/blib/arch​:/tmp/loop_over_bdir-31517-i9L6PE/FusionInventory-Agent-2.3.17-0/blib/lib"
  PERL5OPT=""
  PERL5_CPANPLUS_IS_RUNNING="24479"
  PERL5_CPAN_IS_RUNNING="24479"
  PERL_CANARY_STABILITY_NOPROMPT="1"
  PERL_MM_USE_DEFAULT="1"
  @​INC​:
  /tmp/loop_over_bdir-31517-i9L6PE/FusionInventory-Agent-2.3.17-0/blib/arch
  /tmp/loop_over_bdir-31517-i9L6PE/FusionInventory-Agent-2.3.17-0/blib/lib
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.25.0-48-gfcd1306/f7bf/lib/site_perl/5.25.1/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.25.0-48-gfcd1306/f7bf/lib/site_perl/5.25.1
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.25.0-48-gfcd1306/f7bf/lib/5.25.1/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.25.0-48-gfcd1306/f7bf/lib/5.25.1
  .

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2016

From @iabyn

On Wed, Jun 01, 2016 at 06​:47​:48PM -0700, Andreas J. Koenig via RT wrote​:

bisect
------
commit a52f2cc
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Wed Jun 27 23​:34​:04 2012 +0200

Validate the 'require Bare&#8203;::Word' pathname\.

This is because of poor toking of the require keyword in toke.c.
Perl correctly parses

  require;

as

  require $_;

while perl (even prior to the bisect) incorrectly parses the first require
in

  $_[0] ? require : require $_[0]

as

  require '';

(where the const is actually a zero-length bareword) due to getting
confused by the colon following the require.

The bisected commit merely turned such a name into a compile-time error​:

  Bareword in require maps to empty filename

I'm not sure how to fix this. It seems to be an intersection of​:

* default args
* ?​: operator
* '​:' being a valid leading char in require's arg

I suspect something needs fixing in S_force_word.

--
The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
  -- Things That Never Happen in "Star Trek" #10

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2016

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

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2016

From @cpansprout

On Thu Jun 02 14​:52​:34 2016, davem wrote​:

I suspect something needs fixing in S_force_word.

The attached seems to do it.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2016

From @cpansprout

Inline Patch
diff --git a/toke.c b/toke.c
index 2c6cd85..02c1325 100644
--- a/toke.c
+++ b/toke.c
@@ -2012,7 +2012,7 @@ S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack)
     start = skipspace(start);
     s = start;
     if (isIDFIRST_lazy_if(s,UTF)
-        || (allow_pack && *s == ':') )
+        || (allow_pack && *s == ':' && s[1] == ':') )
     {
 	s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, allow_pack, &len);
 	if (check_keyword) {

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2016

From @cpansprout

On Thu Jun 02 18​:04​:25 2016, sprout wrote​:

On Thu Jun 02 14​:52​:34 2016, davem wrote​:

I suspect something needs fixing in S_force_word.

The attached seems to do it.

I’ve applied it, with tests, as e7127e2.

--

Father Chrysostomos

@p5pRT p5pRT closed this as completed Jun 3, 2016
@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2016

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant