Skip to content

BBC: v5.43.2 breaks MAUKE/Switch-Plain-0.0501.tar.gz #23686

@andk

Description

@andk

Description

With commit v5.43.1-40-g75a310dd6d tests with debugging perls of MAUKE/Switch-Plain-0.0501.tar.gz are running into an assertion:

perl: peep.c:3621: Perl_rpeep: Assertion stub == OpSIBLING(OpSIBLING( cLOGOP->op_first ))' failed.`

Fail report: https://www.cpantesters.org/cpan/report/dd4f0c60-89ef-11f0-bb62-8268fbfb54e6

Bisect leads to

commit 75a310dd6d6a8cfcd7519613d66d46756b5265f0
Author: Richard Leach <[email protected]>
Date:   Fri Dec 20 17:33:13 2024 +0000

    op.c/peep.c - Optimise away empty else{} blocks
    
    This is a replacement for https://github.com/Perl/perl5/pull/22745, which
    aimed to prevent the associated `OP_STUB` from being created in
    `Perl_newCONDOP` and subsequently removed in peep.c. However, doing that
    turned out to be unavoidable, since it is not safe to omit the `OP_STUB`
    if it is in scalar context, but `Perl_newCONDOP` runs before context is
    applied.
    
    This commit:
     * Re-adds the logic in `Perl_op_scope` to not wrap a bare `OP_STUB` in an
       `ENTER/LEAVE` pair.
     * Removes any relevant `OP_STUB`s in non-scalar context in `Perl_rpeep`.
     * Adds B::Deparse support
     * Adds a test based on the failures seen in https://github.com/Perl/perl5/issues/22866

Steps to Reproduce

cpan -i MAUKE/Switch-Plain-0.0501.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=5.4.0-216-generic
    archname=x86_64-linux
    uname='linux k93focal 5.4.0-216-generic #236-ubuntu smp fri apr 11 19:53:21 utc 2025 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/host/k93focal/v5.43.2/b254 -Dmyhostname=k93focal -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'
    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'
    optimize='-O2 -g'
    cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='9.4.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='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/x86_64-linux-gnu /usr/lib /usr/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.31.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.31'
  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
  Built under linux
  Compiled at Aug 26 2025 20:20:28
  %ENV:
    PERL="/tmp/basesmoker-reloperl-X2Ur/bin/perl"
    PERL5LIB="/tmp/loop_over_bdir-1215702-hxGB3Y/Net-OpenVPN-DDNS-0.1-0/blib/arch:/tmp/loop_over_bdir-1215702-hxGB3Y/Net-OpenVPN-DDNS-0.1-0/blib/lib:/tmp/loop_over_bdir-1215702-hxGB3Y/Business-Shipping-DataFiles-1.02-0/blib/arch:/tmp/loop_over_bdir-1215702-hxGB3Y/Business-Shipping-DataFiles-1.02-0/blib/lib:/tmp/loop_over_bdir-1215702-hxGB3Y/Net-Async-WebService-lxd-0.03-0/blib/arch:/tmp/loop_over_bdir-1215702-hxGB3Y/Net-Async-WebService-lxd-0.03-0/blib/lib"
    PERL5OPT=""
    PERL5_CPANPLUS_IS_RUNNING="1215715"
    PERL5_CPAN_IS_RUNNING="1215715"
    PERL_CANARY_STABILITY_NOPROMPT="1"
    PERL_MM_USE_DEFAULT="1"
    PERL_USE_UNSAFE_INC="1"
  @INC:
    /tmp/loop_over_bdir-1215702-hxGB3Y/Net-OpenVPN-DDNS-0.1-0/blib/arch
    /tmp/loop_over_bdir-1215702-hxGB3Y/Net-OpenVPN-DDNS-0.1-0/blib/lib
    /tmp/loop_over_bdir-1215702-hxGB3Y/Business-Shipping-DataFiles-1.02-0/blib/arch
    /tmp/loop_over_bdir-1215702-hxGB3Y/Business-Shipping-DataFiles-1.02-0/blib/lib
    /tmp/loop_over_bdir-1215702-hxGB3Y/Net-Async-WebService-lxd-0.03-0/blib/arch
    /tmp/loop_over_bdir-1215702-hxGB3Y/Net-Async-WebService-lxd-0.03-0/blib/lib
    /home/sand/src/perl/repoperls/installed-perls/host/k93focal/v5.43.2/b254/lib/site_perl/5.43.2/x86_64-linux
    /home/sand/src/perl/repoperls/installed-perls/host/k93focal/v5.43.2/b254/lib/site_perl/5.43.2
    /home/sand/src/perl/repoperls/installed-perls/host/k93focal/v5.43.2/b254/lib/5.43.2/x86_64-linux
    /home/sand/src/perl/repoperls/installed-perls/host/k93focal/v5.43.2/b254/lib/5.43.2
    .

Metadata

Metadata

Assignees

Labels

BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)hasPatch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions