Skip Menu |

This queue is for tickets about the Sub-Quote CPAN distribution.

Report information
The Basics
Id: 133548
Status: rejected
Priority: 0/
Queue: Sub-Quote

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.006006
Fixed in: (no value)



Subject: Test failures for t/quotify-no-hex.t and t/quotify.t
From what I can tell, these tests are failing inconsistently in CPAN testers also. t/croak-locations.t ........... ok t/hints.t ..................... ok t/inline.t .................... ok t/leaks.t ..................... ok t/quotify-5.6.t ............... ok # Failed test '"\b" utf8: string value maintained' # at ./t/quotify.t line 245. # got: '\b' # expected: ' # Failed test '"\b" utf8: string value maintained under utf8' # at ./t/quotify.t line 245. # got: '\b' # expected: ' # Failed test '"\e" utf8: string value maintained' # at ./t/quotify.t line 245. # got: '\e' # expected: ' # Failed test '"\e" utf8: string value maintained under utf8' # at ./t/quotify.t line 245. # got: '\e' # expected: ' # Looks like you failed 4 tests of 3041. t/quotify-no-hex.t ............ Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/3041 subtests # Failed test '"\b" utf8: string value maintained' # at t/quotify.t line 245. # got: '\b' # expected: ' # Failed test '"\b" utf8: string value maintained under utf8' # at t/quotify.t line 245. # got: '\b' # expected: ' # Failed test '"\e" utf8: string value maintained' # at t/quotify.t line 245. # got: '\e' # expected: ' # Failed test '"\e" utf8: string value maintained under utf8' # at t/quotify.t line 245. # got: '\e' # expected: ' # Looks like you failed 4 tests of 3041. t/quotify.t ................... Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/3041 subtests t/sub-defer-no-subname.t ...... ok t/sub-defer-threads.t ......... skipped: your perl does not support ithreads t/sub-defer.t ................. ok t/sub-quote-threads.t ......... skipped: your perl does not support ithreads t/sub-quote.t ................. ok t/subname-none.t .............. ok t/subname-sub-name-preload.t .. ok t/subname-sub-name.t .......... ok t/subname-sub-util.t .......... ok Test Summary Report ------------------- t/quotify-no-hex.t (Wstat: 1024 Tests: 3041 Failed: 4) Failed tests: 2293-2294, 2350-2351 Non-zero exit status: 4 t/quotify.t (Wstat: 1024 Tests: 3041 Failed: 4) Failed tests: 2293-2294, 2350-2351 Non-zero exit status: 4
What perl is this? The only place with similar failures is perl 5.31.9
On Sat Oct 17 16:15:10 2020, haarg wrote: Show quoted text
> What perl is this? The only place with similar failures is perl 5.31.9
Yep. We're building out our 5.32.0 stack and noticed it.
On Sat Oct 17 17:27:53 2020, TODDR wrote: Show quoted text
> On Sat Oct 17 16:15:10 2020, haarg wrote:
> > What perl is this? The only place with similar failures is perl 5.31.9
> > Yep. We're building out our 5.32.0 stack and noticed it.
Can you include the full perl -V? The failures on cpan testers are really only on 5.31.9, not any other 5.31 version or 5.32.
On Sat Oct 17 18:57:31 2020, haarg wrote: Show quoted text
> Can you include the full perl -V? The failures on cpan testers are > really only on 5.31.9, not any other 5.31 version or 5.32.
[root@rpmb-64-centos-65 bin]# ./perl -V Summary of my perl5 (revision 5 version 32 subversion 0) configuration: Platform: osname=linux osvers=2.6.32-431.29.2.el6.x86_64 archname=x86_64-linux-64int uname='linux rpmb-64-centos-65.dev.cpanel.net 2.6.32-431.29.2.el6.x86_64 #1 smp tue sep 9 21:36:05 utc 2014 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Dusedevel -Darchname=x86_64-linux-64int -Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -Dusemymalloc=n -DDEBUGGING=none -Doptimize=-Os -Accflags=-m64 -Dccflags=-DPERL_DISABLE_PMC -fPIC -DPIC -Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended -Duseperlio=yes -Dprefix=/usr/local/cpanel/3rdparty/perl/532 -Dsiteprefix=/opt/cpanel/perl5/532 -Dsitebin=/opt/cpanel/perl5/532/bin -Dsitelib=/opt/cpanel/perl5/532/site_lib -Dusevendorprefix=true -Dvendorbin=/usr/local/cpanel/3rdparty/perl/532/bin -Dvendorprefix=/usr/local/cpanel/3rdparty/perl/532/lib/perl5 -Dvendorlib=/usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib -Dprivlib=/usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0 -Dman1dir=none -Dman3dir=none -Dscriptdir=/usr/local/cpanel/3rdparty/perl/532/bin -Dscriptdirexp=/usr/local/cpanel/3rdparty/perl/532/bin -Dsiteman1dir=none -Dsiteman3dir=none -Dinstallman1dir=none -Dversiononly=no -Dinstallusrbinperl=no -Dcf_by=cPanel -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=support@cpanel.net -DDB_File=true -Ud_dosuid -Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks -Uuselongdouble -Duse64bitint -Uuse64bitall' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='/usr/bin/gcc' ccflags ='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' optimize='-Os' cppflags='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='' gccversion='4.4.7 20120313 (Red Hat 4.4.7-4)' 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='/usr/bin/gcc' ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.12.so so=so useshrplib=true libperl=libperl.so gnulibc_version='2.12' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0/x86_64-linux-64int/CORE' cccdlflags='-fPIC' lddlflags='-shared -Os -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_USE_DEVEL 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 Locally applied patches: cPanel - disable man installs cPanel - cPanel INC PATH cPanel - Avoid importing symbols unless requested cPanel - Disable termcap warning when TERM is unset cPanel - Do not warn when close fails because the file handle is bad. cPanel - COW Static support cPanel - Use dup2 from Cpanel::POSIX::Tiny cPanel - Disable 14fileno.t tests since Cpanel::POSIX::Tiny is not cPanel - Avoid use vars when our will do in Core Perl cPanel - add Perl_DeclareStaticMemory cPanel - Disable xs handshake cPanel - Switch several CPAN modules to XSLoader cPanel - BC Static shared memory for single malloc cPanel - Hard code frequent Config checks so it's not needed cPanel - Storable do not load Fcntl cPanel - Optimize File::Find performance for backup metadata building cPanel - Reduce Scalar::Utils regex overhead cPanel - skip shadow call when euid > 0 on linux cPanel - Fix warning from Memoize::Expire cPanel - Remove use vars from Digest:: cPanel - Remove launcher regex in Config.pm cPanel - BC extra protection in Perl_sv_vcatpvfn_flags cPanel - Fix Getopt::Long version number to be 2.50 not 2.5 cPanel - Reduce startup size of PL_strtab cPanel - add test for CVE-2018-12015 (RT #133250) cPanel - CPAN::Config use manual install as default for root cPanel - Avoid a warning from cpan when run with warnings cPanel - die_unwind(): global destruction Built under linux Compiled at Oct 16 2020 16:37:41 @INC: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0 /opt/cpanel/perl5/532/site_lib/x86_64-linux-64int /opt/cpanel/perl5/532/site_lib
On Sat Oct 17 21:29:50 2020, TODDR wrote: Show quoted text
> On Sat Oct 17 18:57:31 2020, haarg wrote:
> > Can you include the full perl -V? The failures on cpan testers are > > really only on 5.31.9, not any other 5.31 version or 5.32.
> > > [root@rpmb-64-centos-65 bin]# ./perl -V > Summary of my perl5 (revision 5 version 32 subversion 0) > configuration: > > Platform: > osname=linux > osvers=2.6.32-431.29.2.el6.x86_64 > archname=x86_64-linux-64int > uname='linux rpmb-64-centos-65.dev.cpanel.net 2.6.32- > 431.29.2.el6.x86_64 #1 smp tue sep 9 21:36:05 utc 2014 x86_64 x86_64 > x86_64 gnulinux ' > config_args='-des -Dusedevel -Darchname=x86_64-linux-64int > -Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -Dusemymalloc=n -DDEBUGGING=none > -Doptimize=-Os -Accflags=-m64 -Dccflags=-DPERL_DISABLE_PMC -fPIC -DPIC > -Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended > -Duseperlio=yes -Dprefix=/usr/local/cpanel/3rdparty/perl/532 > -Dsiteprefix=/opt/cpanel/perl5/532 -Dsitebin=/opt/cpanel/perl5/532/bin > -Dsitelib=/opt/cpanel/perl5/532/site_lib -Dusevendorprefix=true > -Dvendorbin=/usr/local/cpanel/3rdparty/perl/532/bin > -Dvendorprefix=/usr/local/cpanel/3rdparty/perl/532/lib/perl5 > -Dvendorlib=/usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib > -Dprivlib=/usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0 > -Dman1dir=none -Dman3dir=none > -Dscriptdir=/usr/local/cpanel/3rdparty/perl/532/bin > -Dscriptdirexp=/usr/local/cpanel/3rdparty/perl/532/bin > -Dsiteman1dir=none -Dsiteman3dir=none -Dinstallman1dir=none > -Dversiononly=no -Dinstallusrbinperl=no -Dcf_by=cPanel > -Dmyhostname=localhost -Dperladmin=root@localhost > -Dcf_email=support@cpanel.net -DDB_File=true -Ud_dosuid > -Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks > -Uuselongdouble -Duse64bitint -Uuse64bitall' > hint=recommended > useposix=true > d_sigaction=define > useithreads=undef > usemultiplicity=undef > use64bitint=define > use64bitall=undef > uselongdouble=undef > usemymalloc=n > default_inc_excludes_dot=define > bincompat5005=undef > Compiler: > cc='/usr/bin/gcc' > ccflags ='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv -fno-strict- > aliasing -pipe -fstack-protector -I/usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' > optimize='-Os' > cppflags='-DPERL_DISABLE_PMC -fPIC -DPIC -m64 -fwrapv -fno-strict- > aliasing -pipe -fstack-protector -I/usr/local/include' > ccversion='' > gccversion='4.4.7 20120313 (Red Hat 4.4.7-4)' > 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='/usr/bin/gcc' > ldflags =' -fstack-protector -L/usr/local/lib' > libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib > /lib64 /usr/lib64 /usr/local/lib64 > libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc > perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc > libc=libc-2.12.so > so=so > useshrplib=true > libperl=libperl.so > gnulibc_version='2.12' > Dynamic Linking: > dlsrc=dl_dlopen.xs > dlext=so > d_dlsymun=undef > ccdlflags='-Wl,-E -Wl,- > rpath,/usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0/x86_64- > linux-64int/CORE' > cccdlflags='-fPIC' > lddlflags='-shared -Os -L/usr/local/lib -fstack-protector' > > > Characteristics of this binary (from libperl): > Compile-time options: > HAS_TIMES > PERLIO_LAYERS > PERL_COPY_ON_WRITE > PERL_DISABLE_PMC > PERL_DONT_CREATE_GVSV > PERL_MALLOC_WRAP > PERL_OP_PARENT > PERL_PRESERVE_IVUV > PERL_USE_DEVEL > 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 > Locally applied patches: > cPanel - disable man installs > cPanel - cPanel INC PATH > cPanel - Avoid importing symbols unless requested > cPanel - Disable termcap warning when TERM is unset > cPanel - Do not warn when close fails because the file handle is > bad. > cPanel - COW Static support > cPanel - Use dup2 from Cpanel::POSIX::Tiny > cPanel - Disable 14fileno.t tests since Cpanel::POSIX::Tiny is not > cPanel - Avoid use vars when our will do in Core Perl > cPanel - add Perl_DeclareStaticMemory > cPanel - Disable xs handshake > cPanel - Switch several CPAN modules to XSLoader > cPanel - BC Static shared memory for single malloc > cPanel - Hard code frequent Config checks so it's not needed > cPanel - Storable do not load Fcntl > cPanel - Optimize File::Find performance for backup metadata > building > cPanel - Reduce Scalar::Utils regex overhead > cPanel - skip shadow call when euid > 0 on linux > cPanel - Fix warning from Memoize::Expire > cPanel - Remove use vars from Digest:: > cPanel - Remove launcher regex in Config.pm > cPanel - BC extra protection in Perl_sv_vcatpvfn_flags > cPanel - Fix Getopt::Long version number to be 2.50 not 2.5 > cPanel - Reduce startup size of PL_strtab > cPanel - add test for CVE-2018-12015 (RT #133250) > cPanel - CPAN::Config use manual install as default for root > cPanel - Avoid a warning from cpan when run with warnings > cPanel - die_unwind(): global destruction > Built under linux > Compiled at Oct 16 2020 16:37:41 > @INC: > /usr/local/cpanel > /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/x86_64- > linux-64int > /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib > /usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0/x86_64-linux- > 64int > /usr/local/cpanel/3rdparty/perl/532/lib/perl5/5.32.0 > /opt/cpanel/perl5/532/site_lib/x86_64-linux-64int > /opt/cpanel/perl5/532/site_lib
This is almost certainly related to https://github.com/Perl/perl5/issues/17491 or https://github.com/Perl/perl5/issues/17526 which was broken by https://github.com/Perl/perl5/commit/daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 and fixed in https://github.com/Perl/perl5/commit/948c73696c11c6875d4a734a634cdcac79331d4c One of your local patches may be reintroducing this bug.
I can reproduce this problem without any patches straight off of v5.32.0. I'm bisecting perl to be sure the commit that is at fault now.
daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 is the first bad commit commit daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 Author: Karl Williamson <khw@cpan.org> Date: Thu Jan 16 16:14:40 2020 -0700 pv_uni_display: Use common fcn; \b mnemonic This removes the (almost) duplicate code in this function to display mnemonics for control characters that have them. The reason the two pieces of code aren't precisely the same is that the other function also uses \b as a mnemonic for backspace. Using all possible mnemonics is desirable, so a flag is added for pv_uni_display to now use \b. This is now by default enabled in double-quoted strings, but not regex patterns (as \b there means something quite different except in character classes). B.pm is changed to expect \b. ext/B/B.pm | 2 +- ext/B/B.xs | 2 +- ext/B/t/b.t | 1 - utf8.c | 48 ++++++++++++++++++++---------------------------- utf8.h | 8 +++++++- 5 files changed, 29 insertions(+), 32 deletions(-)
On Mon Oct 19 17:10:20 2020, TODDR wrote: Show quoted text
> daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 is the first bad commit > commit daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 > Author: Karl Williamson <khw@cpan.org> > Date: Thu Jan 16 16:14:40 2020 -0700 > > pv_uni_display: Use common fcn; \b mnemonic > > This removes the (almost) duplicate code in this function to display > mnemonics for control characters that have them. The reason the two > pieces of code aren't precisely the same is that the other function > also > uses \b as a mnemonic for backspace. Using all possible mnemonics is > desirable, so a flag is added for pv_uni_display to now use \b. This > is > now by default enabled in double-quoted strings, but not regex > patterns > (as \b there means something quite different except in character > classes). > B.pm is changed to expect \b. > > ext/B/B.pm | 2 +- > ext/B/B.xs | 2 +- > ext/B/t/b.t | 1 - > utf8.c | 48 ++++++++++++++++++++---------------------------- > utf8.h | 8 +++++++- > 5 files changed, 29 insertions(+), 32 deletions(-)
Yes, that's the commit with the bug that I identified in my previous message. It was only ever broken in blead, and was fixed in 948c73696c11c6875d4a734a634cdcac79331d4c, before the next dev release was shipped. I can't reproduce this with any released version of perl, including the the dev versions. Could there be something in one of your custom lib directories that is interfering? Here's a minimal test case you can try, rather than needing the full Sub::Quote tests: perl -e' use B; my $in = "\x{1b}"; utf8::upgrade($in); my $code = B::perlstring($in); my $out = eval $code; print $in eq $out ? "ok\n" : "not ok\n"; ' Can you check the results of this with your perl build?
TL;DR: All good. Nothing is wrong with Sub::Quote here. Thanks! Thanks for your patience and your assistance. So it turns out I was failing to notice that we've been patching Sub::Quote with a patch so it doesn't use B.pm. This is because of the heisenberg problems associated with B::C trying to guess if the program its compiling needs B or if B was loaded and is needed to run the compiled program. So what we did was to extract the needed subroutines and made them more generally available on CPAN via XString. I'm submitting this patch to Sub::Quote so you can take it if you like. Feel free to also close the PR and reject it. -- Todd