# New Ticket Created by James E Keenan # Please include the string: [perl #134172] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=134172 > The following smoke test indicates that a recent change to blead is causing failures in t/op/sprintf2.t on FreeBSD-11. ##### http://perl5.test-smoke.org/report/88863 ##### In each of 36 different configurations in the smoke test run, all tests pass individually, but the file has a whole is graded FAIL. ##### $ cd t; ./perl harness -v op/sprintf2.t;cd - ok 1 - the sprintf "%.<number>g" optimization ok 2 - the sprintf "%.<number>f" optimization ok 3 - width calculation under utf8 upgrade, length=1 ... ok 1698 - special-case %.0f on -4503599627370503 ok 1699 - croak for very large numeric format results Dubious, test returned 9 (wstat 2304, 0x900) All 1699 subtests passed (less 30 skipped subtests: 1669 okay) Test Summary Report ------------------- op/sprintf2.t (Wstat: 2304 Tests: 1699 Failed: 0) Non-zero exit status: 9 Files=1, Tests=1699, 0 wallclock secs ( 0.20 usr 0.01 sys + 0.16 cusr 0.11 csys = 0.48 CPU) Result: FAIL ##### Bisecting with the following command ... ##### perl Porting/bisect.pl --start=e3c1dc81bd --end=9f58603ced --target t/op/sprintf2.t ##### ... gave this result: ##### ... good - zero exit from ./perl -Ilib t/op/sprintf2.t Runner returned 0 for end revision at Porting/bisect.pl line 233. That took 114 seconds. ##### ... which is not useful. I hypothesized that something is tickling .t/TEST or ./t perl harness with respect to the failing test (or vice versa). To test this hypothesis, I reviewed 'git log' and noticed two commits which might have touched sprintf functionality. I built perl at each of them, saw that one PASS and one FAIL; confirmed the FAIL. ##### commit 027471cf1095f75f273df40310e4647fe1e8a9df Author: Tony Cook <tony@develop-help.com> AuthorDate: Wed Mar 20 16:47:49 2019 +1100 Commit: Tony Cook <tony@develop-help.com> CommitDate: Mon Jun 3 15:48:34 2019 +1000 (perl #133913) limit numeric format results to INT_MAX The return value of v?snprintf() is int, and we pay attention to that return value, so limit the expected size of numeric formats to INT_MAX. ##### Thank you very much. Jim Keenan ##### Summary of my perl5 (revision 5 version 31 subversion 1) configuration: Commit id: 027471cf1095f75f273df40310e4647fe1e8a9df Platform: osname=freebsd osvers=11.2-stable archname=amd64-freebsd-thread-multi uname='freebsd perlmonger.nycbug.org 11.2-stable freebsd 11.2-stable #0 r339445: sat oct 20 00:08:11 utc 2018 root@perlmonger.nycbug.org:usrobjusrsrcsysgeneric amd64 ' config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2' optimize='-O2 -pipe -fstack-protector -fno-strict-aliasing' cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)' 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 ='-pthread -Wl,-E -fstack-protector-strong -L/usr/local/lib' libpth=/usr/lib /usr/local/lib /usr/lib/clang/6.0.1/lib /usr/lib libs=-lpthread -lgdbm -ldl -lm -lcrypt -lutil perllibs=-lpthread -ldl -lm -lcrypt -lutil libc= so=so useshrplib=false libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags=' ' cccdlflags='-DPIC -fPIC' lddlflags='-shared -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_USE_DEVEL 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_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under freebsd Compiled at Jun 4 2019 00:08:26 %ENV: PERL2DIR="/home/jkeenan/gitwork/perl2" PERL_WORKDIR="/home/jkeenan/gitwork/perl" @INC: lib /usr/local/lib/perl5/site_perl/5.31.1/amd64-freebsd-thread-multi /usr/local/lib/perl5/site_perl/5.31.1 /usr/local/lib/perl5/5.31.1/amd64-freebsd-thread-multi /usr/local/lib/perl5/5.31.1Thread Previous