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: Blead Breaks String::Random::Regexp::regxstring #22688

Open
cjg-cguevara opened this issue Oct 21, 2024 · 8 comments
Open

BBC: Blead Breaks String::Random::Regexp::regxstring #22688

cjg-cguevara opened this issue Oct 21, 2024 · 8 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@cjg-cguevara
Copy link

This is a bug report for perl from "Carlos Guevara" [email protected],
generated with the help of perlbug 1.43 running under perl 5.41.6.


BBC: Blead Breaks String::Random::Regexp::regxstring

Please see http://fast-matrix.cpantesters.org/?dist=String::Random::Regexp::regxstring


Flags

  • category=core
  • severity=low

Perl configuration

Site configuration information for perl 5.41.6:

Configured by cpan at Sun Oct 20 22:36:51 EDT 2024.

Summary of my perl5 (revision 5 version 41 subversion 6) configuration:
  Commit id: cb2baa70118e364c1428dc77cb8f9c614060c26e
  Platform:
    osname=linux
    osvers=5.14.0-427.40.1.el9_4.x86_64
    archname=x86_64-linux
    uname='linux cjg-rhel9 5.14.0-427.40.1.el9_4.x86_64 #1 smp preempt_dynamic fri oct 4 15:22:45 edt 2024 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Dprefix=/home/cpan/bin/perl -Dscriptdir=/home/cpan/bin/perl/bin -Dusedevel -Duse64bitall'
    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 -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'
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='11.4.1 20231218 (Red Hat 11.4.1-3)'
    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 /usr/lib64 /usr/local/lib64
    libs=-lpthread -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
    libc=/lib/../lib64/libc.so.6
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.34'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


---
@INC for perl 5.41.6:
    /home/cpan/bin/perl/lib/site_perl/5.41.6/x86_64-linux
    /home/cpan/bin/perl/lib/site_perl/5.41.6
    /home/cpan/bin/perl/lib/5.41.6/x86_64-linux
    /home/cpan/bin/perl/lib/5.41.6

---
Environment for perl 5.41.6:
    HOME=/home/cpan
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_ALL=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/cpan/bin/perl/bin:/home/cpan/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/bash
@mauke
Copy link
Contributor

mauke commented Oct 21, 2024

Error message:

Unparseable XSUB parameter: '... /*optional params: int debug*/' in String-Random-Regexp-regxstring.xs, line 48

@jkeenan jkeenan added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) and removed Needs Triage labels Oct 21, 2024
@jkeenan
Copy link
Contributor

jkeenan commented Oct 21, 2024

I tried to bisect with:

$ perl Porting/bisect.pl \
--start=69864d9a5ac17bf15bfb560c1c08977dc527eb6e^ \
--end=a66489bb47fd2e66a5fb15dd3372a76fdc0c8352 \
--module=String::Random::Regexp::regxstring

However, the bisection quickly failed with:

Running install for module 'String::Random::Regexp::regxstring'
Checksum for /home/jkeenan/.cpan/sources/authors/id/B/BL/BLIAKO/String-Random-Regexp-regxstring-1.03.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring B/BL/BLIAKO/String-Random-Regexp-regxstring-1.03.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for String::Random::Regexp::regxstring
Writing MYMETA.yml and MYMETA.json
  BLIAKO/String-Random-Regexp-regxstring-1.03.tar.gz
  /tmp/rGpulH8RwD/bin/perl Makefile.PL -- OK
Running make for B/BL/BLIAKO/String-Random-Regexp-regxstring-1.03.tar.gz
cp lib/String/Random/Regexp/regxstring.pm blib/lib/String/Random/Regexp/regxstring.pm
Running Mkbootstrap for regxstring ()
chmod 644 "regxstring.bs"
"/tmp/rGpulH8RwD/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- regxstring.bs blib/arch/auto/String/Random/Regexp/regxstring/regxstring.bs 644
"/tmp/rGpulH8RwD/bin/perl" "/tmp/rGpulH8RwD/lib/perl5/5.41.5/ExtUtils/xsubpp"  -C++ -typemap '/tmp/rGpulH8RwD/lib/perl5/5.41.5/ExtUtils/typemap'  String-Random-Regexp-regxstring.xs > String-Random-Regexp-regxstring.xsc
mv String-Random-Regexp-regxstring.xsc String-Random-Regexp-regxstring.c
c++ -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -g    -DVERSION=\"1.03\"  -DXS_VERSION=\"1.03\" -DPIC -fPIC "-I/tmp/rGpulH8RwD/lib/perl5/5.41.5/amd64-freebsd/CORE"   String-Random-Regexp-regxstring.c
c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
c++ -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -g    -DVERSION=\"1.03\"  -DXS_VERSION=\"1.03\" -DPIC -fPIC "-I/tmp/rGpulH8RwD/lib/perl5/5.41.5/amd64-freebsd/CORE"   harness.cpp
In file included from harness.cpp:5:
In file included from /usr/include/c++/v1/iostream:43:
In file included from /usr/include/c++/v1/ios:222:
In file included from /usr/include/c++/v1/__locale:15:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:27:
In file included from /usr/include/c++/v1/__memory/compressed_pair.h:14:
/usr/include/c++/v1/__fwd/get.h:18:10: fatal error: '__tuple/tuple_element.h' file not found
   18 | #include <__tuple/tuple_element.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make: stopped in /tmp/OA4fQgiu1f/String-Random-Regexp-regxstring-1.03-0
  BLIAKO/String-Random-Regexp-regxstring-1.03.tar.gz
  /usr/bin/make -- NOT OK
Died at -e line 2.
HEAD is now at 19a540392d regexec.c: Remove no-value-added function
bad - non-zero exit from /tmp/rGpulH8RwD/bin/perl -I /home/jkeenan/.cpan -MCPAN::MyConfig -MCPAN -e $CPAN::Config->{build_dir}=q{/tmp/OA4fQgiu1f}; -e install('String::Random::Regexp::regxstring'); die unless CPAN::Shell->expand(Module => 'String::Random::Regexp::regxstring')->uptodate;
Runner returned 256, not 0 for start revision at Porting/bisect.pl line 240.
That took 277 seconds.
[perlmonger: perl2] $ perl Porting/bisect.pl \
--start=69864d9a5ac17bf15bfb560c1c08977dc527eb6e^ \
--end=a66489bb47fd2e66a5fb15dd3372a76fdc0c8352 \
--module=String::Random::Regexp::regxstring

More investigation needed.

@mauke
Copy link
Contributor

mauke commented Oct 21, 2024

@jkeenan Is this on freebsd? If so, this bug report looks relevant: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278377#c12
(Just for the __tuple/tuple_element.h error, not perl.)

@jkeenan
Copy link
Contributor

jkeenan commented Oct 21, 2024

@jkeenan Is this on freebsd? If so, this bug report looks relevant: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278377#c12 (Just for the __tuple/tuple_element.h error, not perl.)

Indeed, it was. Thanks for flagging that. Retrying bisection on Linux.

@jkeenan
Copy link
Contributor

jkeenan commented Oct 21, 2024

@jkeenan Is this on freebsd? If so, this bug report looks relevant: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278377#c12 (Just for the __tuple/tuple_element.h error, not perl.)

Indeed, it was. Thanks for flagging that. Retrying bisection on Linux.

As with other recent BBCs, the breaking commit was:

a399a4923c7f15aa1aa5bdb38a5dccf59ef51678 is the first bad commit
commit a399a4923c7f15aa1aa5bdb38a5dccf59ef51678
Author: David Mitchell <[email protected]>
Date:   Mon Sep 23 18:52:11 2024 +0100

    ParseXS: refactor: XSUB signature-processing
$ uname -mrs
Linux 6.1.0-23-amd64 x86_64
$ debian_version
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)

@hadjiprocopis
Copy link

hadjiprocopis commented Oct 22, 2024

Hi, I am the author of String::Random::Regexp::regxstring

I have just been alerted to this issue and that it also arises for perl 5.41.5. I have now installed 5.41.5 and indeed compilation failed. The compiler complains about the comment in the function signature, re: Unparseable XSUB parameter: ... etc. (in file String-Random-Regexp-regxstring.xs, function generate_random_strings_xs.

I have removed that comment and in my system and with perl 5.41.5 it compiles fine and passes all tests.

Let me know if you want me to install a new version to fix or you want me to wait for you to investigate.

My sin is that I have not really understood when and where are comments (C-style or Perl) allowed in XS code. So I am not sure at all that the comment I inserted inside the function signature was valid or not. For example, 5.38.2 allows a comment inside the function signature but not before function signature or after.

many thanks,

bliako

@iabyn
Copy link
Contributor

iabyn commented Oct 22, 2024 via email

@hadjiprocopis
Copy link

Got it, thanks. I will remove the comment in the signature. I will update soon.

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)
Projects
None yet
Development

No branches or pull requests

5 participants