-
Notifications
You must be signed in to change notification settings - Fork 591
Open
Labels
BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)Blead Breaks CPAN - changes in blead broke a cpan module(s)
Description
Description
With commit v5.43.1-82-gc0053197fb several tests in XS-Framework-1.6.0 start failing.
Fail report: https://www.cpantesters.org/cpan/report/91344780-8b86-11f0-8e41-c21c48896d2d
Bisect leads to:
commit c0053197fb3c4bbe8d0582fb502ab99e6edc1881
Author: Lukas Mai <lukasmai.403@gmail.com>
Date: Tue Jul 29 08:16:11 2025 +0200
Reapply "op.c: re-enable coderef-in-stash optimization"
When seeing 'sub foo { ... }', perl does not need to allocate a full
typeglob (with the subroutine being stored in the CODE slot). Instead,
it can just store a coderef directly in the stash.
This optimization was first announced in perl5220delta:
> - Subroutines in packages no longer need to be stored in typeglobs:
> declaring a subroutine will now put a simple sub reference directly
> in the stash if possible, saving memory. The typeglob still
> notionally exists, so accessing it will cause the stash entry to be
> upgraded to a typeglob (i.e. this is just an internal implementation
> detail). This optimization does not currently apply to XSUBs or
> exported subroutines, and method calls will undo it, since they
> cache things in typeglobs. [GH #13392]
However, due to a bug this optimization didn't actually work except for
package main (GH #15671). The issue was fixed in v5.27.5, but the fix
was backed out again in v5.27.9 because of CPAN breakage.
It was enabled again in v5.41.9, but backed out again again in v5.41.10
because of too much CPAN breakage this late in the development cycle.
This reverts commit 51f234647f80e4fd56b09f001aab877f4edf1c18.
Also fix class_cleanup_definition: We actually store a reference-to-CV
in the stash, not a bare CV, so we need to dereference once to recognize
methods defined this way.
See #23131 for details (and expected CPAN breakage).
class.c | 11 +++++++----
op.c | 3 ---
t/op/sub.t | 5 +----
3 files changed, 8 insertions(+), 11 deletions(-)
bisect found first bad commit
@mauke , you expected CPAN breakage.
Steps to Reproduce
cpan -i SYBER/XS-Framework-1.6.0.tar.gz
Expected behavior
Worked up to this commit
Perl configuration
# perl -V output goes here
Summary of my perl5 (revision 5 version 43 subversion 2) configuration:
Commit id: 7afd3f158f75d5730469889406f8f98c681d58c1
Platform:
osname=linux
osvers=6.12.22-amd64
archname=x86_64-linux-quadmath
uname='linux k93msid 6.12.22-amd64 #1 smp preempt_dynamic debian 6.12.22-1 (2025-04-10) x86_64 gnulinux '
config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.43.2/ec94 -Dmyhostname=k93msid -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 -Uuseithreads -Uuselongdouble -DEBUGGING=both -Dusequadmath'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fwrapv -DDEBUGGING -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='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='14.2.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='__float128'
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/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -ldl -lm -lcrypt -lutil -lc -lquadmath
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc -lquadmath
libc=/lib/x86_64-linux-gnu/libc.so.6
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.41'
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:
DEBUGGING
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_DEVEL
PERL_USE_SAFE_PUTENV
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
USE_QUADMATH
Built under linux
Compiled at Aug 22 2025 12:20:49
%ENV:
PERL5LIB=""
PERL5OPT=""
PERL5_CPANPLUS_IS_RUNNING="2864303"
PERL5_CPAN_IS_RUNNING="2864303"
PERL_CANARY_STABILITY_NOPROMPT="1"
PERL_MM_USE_DEFAULT="1"
PERL_USE_UNSAFE_INC="1"
@INC:
/home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.43.2/ec94/lib/site_perl/5.43.2/x86_64-linux-quadmath
/home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.43.2/ec94/lib/site_perl/5.43.2
/home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.43.2/ec94/lib/5.43.2/x86_64-linux-quadmath
/home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.43.2/ec94/lib/5.43.2
.
Metadata
Metadata
Assignees
Labels
BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)Blead Breaks CPAN - changes in blead broke a cpan module(s)