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

[PATCH] 2d8d7b1 replace B::COP::stashflags by B::COP::stashlen #12125

Closed
p5pRT opened this issue May 22, 2012 · 10 comments
Closed

[PATCH] 2d8d7b1 replace B::COP::stashflags by B::COP::stashlen #12125

p5pRT opened this issue May 22, 2012 · 10 comments
Labels

Comments

@p5pRT
Copy link

p5pRT commented May 22, 2012

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

Searchable as RT113034$

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

From @rurban

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.7.

From 2d8d7b1c730932ee5a45c88f1ec23e5fbedd9b81 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Tue, 22 May 2012 10​:57​:03 -0500
Subject​: [PATCH] replace B​::COP​::stashflags by B​::COP​::stashlen
MIME-Version​: 1.0
Content-Type​: multipart/mixed; boundary="------------1.7.10"

This is a multi-part message in MIME format.
--------------1.7.10
Content-Type​: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding​: 8bit

6379d4a (between 5.15.9 and 5.16.0) broke B​::COP​::stashflags which was added
in 5.15.4.


ext/B/B.pm | 4 ++--
ext/B/B.xs | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)

--------------1.7.10
Content-Type​: text/x-patch; name="0001-replace-B-COP-stashflags-by-B-COP-stashlen.patch"
Content-Transfer-Encoding​: 8bit
Content-Disposition​: attachment; filename="0001-replace-B-COP-stashflags-by-B-COP-stashlen.patch"

Inline Patch
diff --git a/ext/B/B.pm b/ext/B/B.pm
index b19693c..75ead53 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
 # walkoptree comes from B.xs
 
 BEGIN {
-    $B::VERSION = '1.34';
+    $B::VERSION = '1.35';
     @B::EXPORT_OK = ();
 
     # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
@@ -1211,7 +1211,7 @@ Only when perl was compiled with ithreads.
 
 =item stashpv
 
-=item stashflags
+=item stashlen
 
 =item file
 
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 4a5ab44..632c874 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -1227,8 +1227,8 @@ pv(o)
 	    ST(0) = newSVpvn_flags(o->op_pv, strlen(o->op_pv), SVs_TEMP);
 
 #define COP_label(o)	CopLABEL(o)
-#ifdef CopSTASH_flags
-#define COP_stashflags(o)	CopSTASH_flags(o)
+#ifdef CopSTASH_len
+#define COP_stashlen(o)	CopSTASH_len(o)
 #endif
 
 MODULE = B	PACKAGE = B::COP		PREFIX = COP_
@@ -1253,10 +1253,10 @@ COP_stash(o)
 	PUSHs(make_sv_object(aTHX_
 			     ix ? (SV *)CopFILEGV(o) : (SV *)CopSTASH(o)));
 
-#ifdef CopSTASH_flags
+#ifdef CopSTASH_len
 
 U32
-COP_stashflags(o)
+COP_stashlen(o)
 	B::COP	o
 
 #endif

--------------1.7.10--


---
Flags:   category=library   severity=critical   module=B

Site configuration information for perl 5.15.7​:

Configured by rurban at Sun Jan 22 12​:13​:34 CST 2012.

Summary of my perl5 (revision 5 version 15 subversion 7) configuration​:
 
  Platform​:
  osname=linux, osvers=3.0.0-1-amd64, archname=x86_64-linux
  uname='linux reini 3.0.0-1-amd64 #1 smp sun jul 24 02​:24​:44 utc 2011 x86_64 gnulinux '
  config_args='-de -Dusedevel -Dinstallman1dir=none -Dinstallman3dir=none -Dinstallsiteman1dir=none -Dinstallsiteman3dir=none -Uuseithreads -Accflags='-msse4.2' -Accflags='-march=corei7' -Dcf_email='rurban@​cpanel.net' -Dperladmin='rurban@​cpanel.net' -Duseshrplib'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-msse4.2 -march=corei7 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.6.1', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  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 -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /usr/lib/x86_64-linux-gnu /lib64 /usr/lib64
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version='2.13'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/lib/perl5/5.15.7/x86_64-linux/CORE'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches​:
 


@​INC for perl 5.15.7​:
  /usr/local/lib/perl5/site_perl/5.15.7/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.15.7
  /usr/local/lib/perl5/5.15.7/x86_64-linux
  /usr/local/lib/perl5/5.15.7
  /usr/local/lib/perl5/site_perl
  .


Environment for perl 5.15.7​:
  HOME=/home/rurban
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/rurban/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/games​:/usr/games
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

From @rurban

This needs to go into 5.16.1 and 5.17.
stashflags was only public between 5.15.4 and 5.15.9
stashlen came with 5.16.0
--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

From [Unknown Contact. See original ticket]

This needs to go into 5.16.1 and 5.17.
stashflags was only public between 5.15.4 and 5.15.9
stashlen came with 5.16.0
--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

From @cpansprout

On Tue May 22 09​:37​:53 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.7.

From 2d8d7b1c730932ee5a45c88f1ec23e5fbedd9b81 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Tue, 22 May 2012 10​:57​:03 -0500
Subject​: [PATCH] replace B​::COP​::stashflags by B​::COP​::stashlen
MIME-Version​: 1.0
Content-Type​: multipart/mixed; boundary="------------1.7.10"

Thank you. Applied as 667d593.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

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

@p5pRT
Copy link
Author

p5pRT commented May 22, 2012

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed May 22, 2012
@p5pRT
Copy link
Author

p5pRT commented Jun 6, 2012

From @rurban

On Tue, May 22, 2012 at 2​:56 PM, Father Chrysostomos via RT
<perlbug-followup@​perl.org> wrote​:

On Tue May 22 09​:37​:53 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.7.

From 2d8d7b1c730932ee5a45c88f1ec23e5fbedd9b81 Mon Sep 17 00​:00​:00 2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Tue, 22 May 2012 10​:57​:03 -0500
Subject​: [PATCH] replace B​::COP​::stashflags by B​::COP​::stashlen

Thank you.  Applied as 667d593.

In a subsequent commit
http​://perl5.git.perl.org/perl.git/commit/a60c099b83a336be6df44b89eb468b0cdfe351ca
you are arguing that "the stashlen method has never been in a stable
release, and no longer
exists, as of d4d0394, since it is dependent on a define that
d4d0394 removed."

This is not quite exactly right.
The stashlen method must appear in the next stable 5.16.1 release.
That is 667d593 must be cherry picked to maint.
It is only renamed in 5.17 to stashoff.
--
Reini

@p5pRT
Copy link
Author

p5pRT commented Jun 6, 2012

From @cpansprout

On Wed Jun 06 13​:42​:21 2012, rurban wrote​:

On Tue, May 22, 2012 at 2​:56 PM, Father Chrysostomos via RT
<perlbug-followup@​perl.org> wrote​:

On Tue May 22 09​:37​:53 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.7.

From 2d8d7b1c730932ee5a45c88f1ec23e5fbedd9b81 Mon Sep 17 00​:00​:00
2001
From​: Reini Urban <rurban@​x-ray.at>
Date​: Tue, 22 May 2012 10​:57​:03 -0500
Subject​: [PATCH] replace B​::COP​::stashflags by B​::COP​::stashlen

Thank you. �Applied as 667d593.

In a subsequent commit

http​://perl5.git.perl.org/perl.git/commit/a60c099b83a336be6df44b89eb468b0cdfe351ca

you are arguing that "the stashlen method has never been in a stable
release, and no longer
exists, as of d4d0394, since it is dependent on a define that
d4d0394 removed."

This is not quite exactly right.
The stashlen method must appear in the next stable 5.16.1 release.
That is 667d593 must be cherry picked to maint.

But I thought you said you didn’t need it, because ->stash->NAME is
sufficient.

It is only renamed in 5.17 to stashoff.

Not quite renamed. It works differently now.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jun 6, 2012

From @rurban

On 06/06/2012 04​:00 PM, Father Chrysostomos via RT wrote​:

On Wed Jun 06 13​:42​:21 2012, rurban wrote​:

On Tue, May 22, 2012 at 2​:56 PM, Father Chrysostomos via RT
<perlbug-followup@​perl.org> wrote​:

On Tue May 22 09​:37​:53 2012, rurban@​cpanel.net wrote​:

This is a bug report for perl from rurban@​cpanel.net,
generated with the help of perlbug 1.39 running under perl 5.15.7.

From 2d8d7b1c730932ee5a45c88f1ec23e5fbedd9b81 Mon Sep 17 00​:00​:00
2001
From​: Reini Urban<rurban@​x-ray.at>
Date​: Tue, 22 May 2012 10​:57​:03 -0500
Subject​: [PATCH] replace B​::COP​::stashflags by B​::COP​::stashlen

Thank you. �Applied as 667d593.

In a subsequent commit

http​://perl5.git.perl.org/perl.git/commit/a60c099b83a336be6df44b89eb468b0cdfe351ca

you are arguing that "the stashlen method has never been in a stable
release, and no longer
exists, as of d4d0394, since it is dependent on a define that
d4d0394 removed."

This is not quite exactly right.
The stashlen method must appear in the next stable 5.16.1 release.
That is 667d593 must be cherry picked to maint.

But I thought you said you didn’t need it, because ->stash->NAME is
sufficient.

If the NAME method returns a PV with the right length, why not. But for 5.17

For consistency with 5.16 I need B​::COP​::stashlen.
In 5.16 we have two different fields holding the same stash length, so I
need to right one, the len in COP not the length stored with the hek.
That they agree is your job. In practice I'm not so sure.

It is only renamed in 5.17 to stashoff.

Not quite renamed. It works differently now.

I know :)
  --
Reini

@p5pRT
Copy link
Author

p5pRT commented Jun 11, 2012

From @rurban

Sigh,

Sending again, the third time now.

---------- Forwarded message ----------
From​: Reini Urban via RT <perlbug-comment@​perl.org>
Date​: Tue, May 22, 2012 at 11​:40 AM
Subject​: [perl #113034] [PATCH] 2d8d7b1 replace B​::COP​::stashflags by
B​::COP​::stashlen
To​:
Cc​: perl5-porters@​perl.org

This needs to go into 5.16.1 and 5.17.
stashflags was only public between 5.15.4 and 5.15.9
stashlen came with 5.16.0
--
Reini Urban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant