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

BBC: 5.39.4 breaks SYBER/XS-Framework-1.5.5.tar.gz #21782

Closed
andk opened this issue Dec 31, 2023 · 2 comments · Fixed by #21813
Closed

BBC: 5.39.4 breaks SYBER/XS-Framework-1.5.5.tar.gz #21782

andk opened this issue Dec 31, 2023 · 2 comments · Fixed by #21813
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) sendToCPAN

Comments

@andk
Copy link
Contributor

andk commented Dec 31, 2023

Description

With v5.39.3-28-g51c2074396 compilation started to fail for SYBER/XS-Framework-1.5.5.tar.gz

Sample fail report: http://www.cpantesters.org/cpan/report/5f6793e2-73f0-11ee-bb6b-9dca9c44798b

Bisect says:

   51c20743966363944d610bca4ea2bb747ea67e52 is the first bad commit
   commit 51c20743966363944d610bca4ea2bb747ea67e52
   Author: Tony Cook <tony@develop-help.com>
   Date:   Tue Mar 14 16:10:28 2023 +1100
   
       64-bit stack: ensure XS sees the large parameter lists
       
       Done by updating the definitions for AX and items to SSize_t
       
       The bootcheck macros will require a bit more work, and need
       a separate test.
   
    XSUB.h                    | 10 +++++-----
    ext/XS-APItest/APItest.xs |  7 +++++++
    t/bigmem/stack.t          |  6 ++++++
    3 files changed, 18 insertions(+), 5 deletions(-)
   bisect found first bad commit

Steps to Reproduce

cpan -i SYBER/XS-Framework-1.5.5.tar.gz

Expected behavior

Should compile and test OK

Perl configuration

# perl -V output goes here
Summary of my perl5 (revision 5 version 39 subversion 4) configuration:
  Commit id: 56211f03a701e3979a0d01069f8515db1c1fc2f0
  Platform:
    osname=linux
    osvers=6.2.0-34-generic
    archname=x86_64-linux-thread-multi-ld
    uname='linux k93jammy 6.2.0-34-generic #34~22.04.1-ubuntu smp preempt_dynamic thu sep 7 13:12:03 utc 2 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.39.4/322f -Dmyhostname=k93jammy -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 -Duseithreads -Duselongdouble -DEBUGGING=-g'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=define
    usemymalloc=n
    default_inc_excludes_dot=define
  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'
    optimize='-O2 -g'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='11.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='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/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=/lib/x86_64-linux-gnu/libc.so.6
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.35'
  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:
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    MULTIPLICITY
    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_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_LONG_DOUBLE
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
    USE_THREAD_SAFE_LOCALE
  Built under linux
  Compiled at Oct 25 2023 21:18:36
  %ENV:
    PERL="/tmp/basesmoker-reloperl-cg4t/bin/perl"
    PERL5LIB=""
    PERL5OPT=""
    PERL5_CPANPLUS_IS_RUNNING="2467"
    PERL5_CPAN_IS_RUNNING="2467"
    PERL_CANARY_STABILITY_NOPROMPT="1"
    PERL_MM_USE_DEFAULT="1"
    PERL_USE_UNSAFE_INC="1"
  @INC:
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.39.4/322f/lib/site_perl/5.39.4/x86_64-linux-thread-multi-ld
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.39.4/322f/lib/site_perl/5.39.4
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.39.4/322f/lib/5.39.4/x86_64-linux-thread-multi-ld
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.39.4/322f/lib/5.39.4
    .

@mauke
Copy link
Contributor

mauke commented Dec 31, 2023

"Done by updating the definitions for AX and items to SSize_t" is exactly why it's failing. The code in the module takes the address of ax and expects it to be I32 *, but now it is SSize_t *. I don't think this is fixable in core, given that we want to support 64-bit stack indices.

@mauke
Copy link
Contributor

mauke commented Dec 31, 2023

Patch submitted at https://rt.cpan.org/Ticket/Display.html?id=150957.

@jkeenan jkeenan added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) sendToCPAN and removed Needs Triage labels Dec 31, 2023
tonycoz added a commit to tonycoz/perl5 that referenced this issue Jan 10, 2024
I hadn't expected code to be taking pointers or references to AX,
which turned out to be wrong, so make them Stack_off_t.

This allows XS::Framework or similar code to build with a default
build of perl, but it will still fail to build if perl is built
with -DPERL_STACK_OFFSET_SSIZET, which can only be fixed by updating
XS::Framework to use Stack_off_t itself.

Fixes Perl#21782
tonycoz added a commit that referenced this issue Jan 10, 2024
I hadn't expected code to be taking pointers or references to AX,
which turned out to be wrong, so make them Stack_off_t.

This allows XS::Framework or similar code to build with a default
build of perl, but it will still fail to build if perl is built
with -DPERL_STACK_OFFSET_SSIZET, which can only be fixed by updating
XS::Framework to use Stack_off_t itself.

Fixes #21782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) sendToCPAN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants