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

entertry is a B::OP since 5.12 #10895

Closed
p5pRT opened this issue Dec 12, 2010 · 6 comments
Closed

entertry is a B::OP since 5.12 #10895

p5pRT opened this issue Dec 12, 2010 · 6 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Dec 12, 2010

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

Searchable as RT80622$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

From @rurban

This is a bug report for perl from rurban@​x-ray.at,
generated with the help of perlbug 1.39 running under perl 5.12.0.


The initial parse-time UNOP is upgraded at ck_eval to an LOGOP,
op_other holding the ptr to leavetr.
Since 5.12 the entertry OP is only a baseop B​::OP.
It should be a B​::LOGOP as before, as it causes problems at
run-time B optype inspection.

The opclass info (opcode.pl) was always wrong,
the B​::Bytecode compiler broke with 5.12.

This inlines patch fixes this​:
From 652ae19d20f08ed7e5b909cb41e6b6b8592f7377 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Sun, 12 Dec 2010 16​:20​:33 +0100
Subject​: [PATCH] Make entertry a LOGOP, not BASEOP/UNOP

The initial parse-time UNOP is upgraded at ck_eval to an LOGOP
- op_other holding the ptr to leavetry -
which causes problems at run-time B optype inspection.
The opclass info was always wrong, the Bytecode compiler broke with 5.12.


opcode.h | 2 +-
regen/opcode.pl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Inline Patch
diff --git a/opcode.h b/opcode.h
index 122c67f..e5454ff 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1895,7 +1895,7 @@ EXTCONST U32 PL_opargs[] = {
 	0x00000604,	/* hintseval */
 	0x00001b40,	/* entereval */
 	0x00001100,	/* leaveeval */
-	0x00000b40,	/* entertry */
+	0x00000340,	/* entertry */
 	0x00000400,	/* leavetry */
 	0x00001b00,	/* ghbyname */
 	0x00011400,	/* ghbyaddr */
diff --git a/regen/opcode.pl b/regen/opcode.pl
index bd3d55a..fe923ed 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -1049,7 +1049,7 @@ hintseval	eval hints		ck_svconst	s$
 entereval	eval "string"		ck_eval		d%	S
 leaveeval	eval "string" exit	ck_null		1	S
 #evalonce	eval constant string	ck_null		d1	S
-entertry	eval {block}		ck_eval		d%	
+entertry	eval {block}		ck_eval		d|	
 leavetry	eval {block} exit	ck_null		@	
 
 # Get system info.
-- 
1.7.2.3

Flags​:
  category=library
  severity=high
  module=B


This perlbug was built using Perl 5.12.0 - Sat Apr 3 23​:45​:04 CEST 2010
It is being executed now by Perl 5.12.0 - Tue Apr 13 19​:02​:43 CEST 2010.

Site configuration information for perl 5.12.0​:

Configured by rurban at Tue Apr 13 19​:02​:43 CEST 2010.

Summary of my perl5 (revision 5 version 12 subversion 0) configuration​:
 
  Platform​:
  osname=cygwin, osvers=1.7.4(0.22553), archname=cygwin-thread-multi-64int
  uname='cygwin_nt-5.1 reini 1.7.4(0.22553) 2010-04-07 11​:02 i686 cygwin '
  config_args='-de -Dlibperl=cygperl5_12_0.dll -Dcc=gcc-4 -Dld=g++-4 -Dmksymlinks -Dusethreads -Dmad=y -Doptimize=-O3'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=undef, uselongdouble=undef
  usemymalloc=y, bincompat5005=undef
  Compiler​:
  cc='gcc-4', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
  optimize='-O3',
  cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.3.4 20090804 (release) 1', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='g++-4', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib /lib
  libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
  perllibs=-ldl -lcrypt
  libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_12_0.dll
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector'

Locally applied patches​:
  RC3


@​INC for perl 5.12.0​:
  /usr/lib/perl5/site_perl/5.12/i686-cygwin
  /usr/lib/perl5/site_perl/5.12
  /usr/lib/perl5/vendor_perl/5.12/i686-cygwin
  /usr/lib/perl5/vendor_perl/5.12
  /usr/lib/perl5/5.12/i686-cygwin
  /usr/lib/perl5/5.12
  /usr/lib/perl5/site_perl/5.12
  /usr/lib/perl5/site_perl/5.10
  /usr/lib/perl5/vendor_perl/5.10
  /usr/lib/perl5/site_perl/5.8
  .


Environment for perl 5.12.0​:
  HOME=/home/urbanr
  LANG=C.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/urbanr/bin​:~/bin​:/usr/local/bin​:/usr/bin​:/usr/sbin​:/cygdrive/c/strawberry/c/bin​:/cygdrive/c/WINDOWS/System32​:/cygdrive/c/WINDOWS​:/cygdrive/c/WINDOWS/System32/WBEM​:/cygdrive/c/PROGRA1/ATT/Graphviz/bin​:/cygdrive/c/PROGRA1/ATT/Graphviz/bin/tools​:/usr/lib/lapack​:/cygdrive/c/oracle/ora112/bin
  PERL_BADLANG (unset)
  SHELL (unset)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

From @rurban

2010/12/12 <perlbug-followup@​perl.org>​:

You can view your ticket at
http​://rt.perl.org/rt3/Ticket/Display.html?id=80622

git-ready patch attached

--
Reini Urban
http​://phpwiki.org/           http​://murbreak.at/

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

From @rurban

0001-Make-entertry-a-LOGOP-not-BASEOP-UNOP.patch
From 652ae19d20f08ed7e5b909cb41e6b6b8592f7377 Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@x-ray.at>
Date: Sun, 12 Dec 2010 16:20:33 +0100
Subject: [PATCH] Make entertry a LOGOP, not BASEOP/UNOP

The initial parse-time UNOP is upgraded at ck_eval to an LOGOP
- op_other holding the ptr to leavetry -
which causes problems at run-time B optype inspection.
The opclass info was always wrong, the Bytecode compiler broke with 5.12.
---
 opcode.h        |    2 +-
 regen/opcode.pl |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opcode.h b/opcode.h
index 122c67f..e5454ff 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1895,7 +1895,7 @@ EXTCONST U32 PL_opargs[] = {
 	0x00000604,	/* hintseval */
 	0x00001b40,	/* entereval */
 	0x00001100,	/* leaveeval */
-	0x00000b40,	/* entertry */
+	0x00000340,	/* entertry */
 	0x00000400,	/* leavetry */
 	0x00001b00,	/* ghbyname */
 	0x00011400,	/* ghbyaddr */
diff --git a/regen/opcode.pl b/regen/opcode.pl
index bd3d55a..fe923ed 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -1049,7 +1049,7 @@ hintseval	eval hints		ck_svconst	s$
 entereval	eval "string"		ck_eval		d%	S
 leaveeval	eval "string" exit	ck_null		1	S
 #evalonce	eval constant string	ck_null		d1	S
-entertry	eval {block}		ck_eval		d%	
+entertry	eval {block}		ck_eval		d|	
 leavetry	eval {block} exit	ck_null		@	
 
 # Get system info.
-- 
1.7.2.3

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

From @cpansprout

On Sun Dec 12 10​:42​:53 2010, rurban wrote​:

From 652ae19d20f08ed7e5b909cb41e6b6b8592f7377 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Sun, 12 Dec 2010 16​:20​:33 +0100
Subject​: [PATCH] Make entertry a LOGOP, not BASEOP/UNOP

Thank you. Applied as a425677.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

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

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Dec 12, 2010

@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant