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.21.9-227-g273e254 breaks DBR/App-assh-1.1.2.tar.gz #14685

Closed
p5pRT opened this issue Apr 30, 2015 · 9 comments
Closed

Bleadperl v5.21.9-227-g273e254 breaks DBR/App-assh-1.1.2.tar.gz #14685

p5pRT opened this issue Apr 30, 2015 · 9 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Apr 30, 2015

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

Searchable as RT124430$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Apr 30, 2015

From @andk

Another one from Slaven​:

bisect


commit 273e254
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Mar 10 13​:16​:23 2015 -0600

  Optimize out unicode_to_native(), native_to_unicode()

rt.cpan ticket


https://rt.cpan.org/Public/Bug/Display.html?id=103976

sample fail report


http​://www.cpantesters.org/cpan/report/0715b4d8-ec10-11e4-a9d0-fe3ae0bfc7aa

stacktrace


#0 0x00007fe330a20065 in invoker_ck_entersub (my_perl=0x10b9010,
  o=o@​entry=0x2102a68, ud=ud@​entry=0x16db3b0) at invoker.xs​:39
#1 0x00007fe331a47b8a in check_cb (my_perl=<optimized out>,
  op=<optimized out>) at Check.xs​:49
#2 0x000000000042794f in Perl_newUNOP (my_perl=0x10b9010, type=185,
  flags=<optimized out>, first=0x21029e0) at op.c​:4814
#3 0x000000000046b614 in Perl_yyparse (my_perl=0x10b9010,
  gramtype=34402856)
  at perly.y​:970
#4 0x00000000004f1e8a in S_doeval (my_perl=0x10b9010, gimme=2,
  outside=<optimized out>, seq=<optimized out>, hh=<optimized out>)
  at pp_ctl.c​:3484
#5 0x00000000004fd378 in Perl_pp_require (my_perl=0x10b9010) at
  pp_ctl.c​:4169
#6 0x00000000004b4c76 in Perl_runops_standard (my_perl=0x10b9010) at
  run.c​:41
#7 0x000000000043c6a2 in Perl_call_sv (my_perl=my_perl@​entry=0x10b9010,
  sv=sv@​entry=0x20838e8, flags=flags@​entry=13) at perl.c​:2748
#8 0x000000000043e9fb in Perl_call_list
  (my_perl=my_perl@​entry=0x10b9010,
  oldscope=oldscope@​entry=63, paramList=0x20837e0) at perl.c​:4859
#9 0x000000000041ea37 in S_process_special_blocks (my_perl=0x10b9010,
  floor=935, fullname=<optimized out>, gv=0x2083948, cv=0x20838e8)
  at op.c​:8902
#10 0x000000000043528a in Perl_newATTRSUB_x (my_perl=0x10b9010,
  floor=34613864, o=0x2083948, proto=0x0, attrs=0x0, block=0x2086ea0,
  o_is_gv=false) at op.c​:8831
#11 0x0000000000438d94 in Perl_utilize (my_perl=0x10b9010,
  aver=34336384,
  floor=23966640, version=0x20bedd8, idop=0x20becf0, arg=0x20bf520)
  at op.c​:6055
#12 0x000000000046c1a3 in Perl_yyparse (my_perl=0x10b9010,
  gramtype=34023560)
  at perly.y​:351
#13 0x00000000004f1e8a in S_doeval (my_perl=0x10b9010, gimme=2,
  outside=<optimized out>, seq=<optimized out>, hh=<optimized out>)
  at pp_ctl.c​:3484
#14 0x00000000004fd378 in Perl_pp_require (my_perl=0x10b9010) at
  pp_ctl.c​:4169
#15 0x00000000004b4c76 in Perl_runops_standard (my_perl=0x10b9010) at
  run.c​:41
#16 0x000000000043c6a2 in Perl_call_sv (my_perl=my_perl@​entry=0x10b9010,
  sv=sv@​entry=0x2051ff0, flags=flags@​entry=13) at perl.c​:2748
[...]

perl -V


Summary of my perl5 (revision 5 version 21 subversion 10) configuration​:
  Commit id​: 273e254
  Platform​:
  osname=linux, osvers=3.16.0-4-amd64,
  archname=x86_64-linux-thread-multi-ld
  uname='linux k83 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt9-1
  (2015-04-08) x86_64 gnulinux '
  config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-227-g273e254/a2da
  -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des
  -Ui_db -Duseithreads -Duselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=define
  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='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='long double', nvsize=16,
  Off_t='off_t', lseeksize=8
  alignbytes=16, 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 -g -L/usr/local/lib
  -fstack-protector-strong'

--
andreas

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Apr 30, 2015

From @khwilliamson

On 04/30/2015 02​:17 PM, (Andreas J. Koenig) (via RT) wrote​:

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #124430]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124430 >

Another one from Slaven​:

bisect
------
commit 273e254
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Mar 10 13​:16​:23 2015 -0600

 Optimize out unicode\_to\_native\(\)\, native\_to\_unicode\(\)

rt.cpan ticket
--------------
https://rt.cpan.org/Public/Bug/Display.html?id=103976

I was able to reproduce this problem, and chatted with Zefram on irc
about it. He believes that the problem lies with
https://github.com/clkao/invoker.  To summarize,

"the necessary and sufficient fix is for invoker_ck_entersub to check
that it's got an entersub op, and skip most of its check-time logic when
it doesn't"

Also, "invoker ought to behave as a lexically-scoped pragma, rather than
globally affecting any use of $-"

And, "this is partly down to the means by which invoker hooks the op
checker, which is via another CPAN module, the combination of the two is
broken, and will fail when it meets any call checker that rewrites an
entersub into some other kind of op. your commit merely introduces
another such rewriting checker"

I've created
https://rt.cpan.org/Public/Bug/Display.html?id=104135
against invoker

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Apr 30, 2015

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

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 20, 2015

From @iabyn

On Thu, Apr 30, 2015 at 05​:23​:55PM -0600, Karl Williamson wrote​:

On 04/30/2015 02​:17 PM, (Andreas J. Koenig) (via RT) wrote​:

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #124430]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=124430 >

Another one from Slaven​:

bisect
------
commit 273e254
Author​: Karl Williamson <khw@​cpan.org>
Date​: Tue Mar 10 13​:16​:23 2015 -0600

Optimize out unicode\_to\_native\(\)\, native\_to\_unicode\(\)

rt.cpan ticket
--------------
https://rt.cpan.org/Public/Bug/Display.html?id=103976

I was able to reproduce this problem, and chatted with Zefram on irc about
it. He believes that the problem lies with
https://github.com/clkao/invoker.  To summarize,

"the necessary and sufficient fix is for invoker_ck_entersub to check that
it's got an entersub op, and skip most of its check-time logic when it
doesn't"

Also, "invoker ought to behave as a lexically-scoped pragma, rather than
globally affecting any use of $-"

And, "this is partly down to the means by which invoker hooks the op
checker, which is via another CPAN module, the combination of the two is
broken, and will fail when it meets any call checker that rewrites an
entersub into some other kind of op. your commit merely introduces another
such rewriting checker"

I've created
https://rt.cpan.org/Public/Bug/Display.html?id=104135
against invoker

BTW, I'm not convinced that the call checker is the right way to optimise
away those functions, in that it is a compile-time check on the CV in the
GV, whereas function calls are normally resolved by a run-time lookup of
the CV in the GV; so for example the following doesn't print "hi"​:

  *utf8​::unicode_to_native = sub { print "hi!\n" };
  utf8​::unicode_to_native($x);

It's probably fairly unlikely that someone will want to override those
functions, and it will still override if the override is done in a
BEGIN/use, but its still not technically correct.

--
If life gives you lemons, you'll probably develop a citric acid allergy.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 20, 2015

From zefram@fysh.org

Dave Mitchell wrote​:

BTW, I'm not convinced that the call checker is the right way to optimise
away those functions, in that it is a compile-time check on the CV in the
GV, whereas function calls are normally resolved by a run-time lookup of
the CV in the GV;

Calls to constant subs already get resolved at compile time. This is
not (entirely) new behaviour. I'm relaxed about runtime monkey-patching
not working; compile-time monkey-patching seems eminently adequate.

Bigger picture​: if we decide that only the runtime-dynamic behaviour is
correct, then that rules out huge swathes of optimisability. Whether it
was originally correct or not, compile-time resolution is the healthier
direction in which to evolve.

-zefram

@p5pRT
Copy link
Author

@p5pRT p5pRT commented May 20, 2015

From @iabyn

On Wed, May 20, 2015 at 11​:43​:44AM +0100, Zefram wrote​:

Bigger picture​: if we decide that only the runtime-dynamic behaviour is
correct, then that rules out huge swathes of optimisability. Whether it
was originally correct or not, compile-time resolution is the healthier
direction in which to evolve.

I think that would break a lot of stuff.

--
Counsellor Troi states something other than the blindingly obvious.
  -- Things That Never Happen in "Star Trek" #16

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 9, 2015

From @jkeenan

On Wed May 20 03​:54​:34 2015, davem wrote​:

On Wed, May 20, 2015 at 11​:43​:44AM +0100, Zefram wrote​:

Bigger picture​: if we decide that only the runtime-dynamic behaviour is
correct, then that rules out huge swathes of optimisability. Whether it
was originally correct or not, compile-time resolution is the healthier
direction in which to evolve.

I think that would break a lot of stuff.

I was able to install App​::assh successfully with cpanm on perl-5.22.0 on linux/x86_64.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Mar 23, 2016

From @rjbs

This appears to have become fixed while we weren't looking.

--
rjbs

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Mar 23, 2016

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