Tony Cook (via RT)
2015-07-29 00:57:36 UTC
# New Ticket Created by Tony Cook
# Please include the string: [perl #125710]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=125710 >
Test Summary Report
-------------------
../ext/POSIX/t/math.t (Wstat: 256 Tests: 136 Failed: 1)
Failed test: 123
Non-zero exit status: 1
Files=1, Tests=136, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.05 cusr 0.11 csys = 0.17 CPU)
Result: FAIL
I enabled NV_PAYLOAD_DEBUG and later added some extra debugging code to the issignalling() XS code, for the failing test this produced:
a[0] = 0x12345
set p[ 0] = 45 (i = 0, m = ff, s = 0, b = 45, u = 00000045)
set p[ 1] = 23 (i = 1, m = ff, s = 8, b = 23, u = 00002300)
set p[ 2] = 01 (i = 2, m = ff, s = 16, b = 01, u = 00010000)
set p[ 3] = 00 (i = 3, m = ff, s = 24, b = 00, u = 00000000)
set p[ 4] = 00 (i = 4, m = ff, s = 32, b = 00, u = 00000000)
set p[ 5] = 00 (i = 5, m = ff, s = 40, b = 00, u = 00000000)
set p[ 6] = f8 (i = 6, m = 07, s = 48, b = 00, u = 00000000)
45 23 01 00 00 00 f0 ff
a[0] = 12345
45 23 01 00 00 00 f8 ff
issig: 45 23 01 00 00 00 f8 ff
offset 6 shift 3 bit 0x8
# Failed test 'setpayloadsig + issignaling'
# at t/math.t line 176.
where the extra code is:
@@ -2710,6 +2710,15 @@ issignaling(nv)
NV nv
CODE:
RETVAL = Perl_isnan(nv) && NV_NAN_IS_SIGNALING(&nv);
+ { unsigned i;
+ unsigned char *p = (unsigned char *)&nv;
+ PerlIO_printf(PerlIO_stderr(), "issig:");
+ for (i = 0; i < sizeof(NV); ++i)
+ PerlIO_printf(PerlIO_stderr(), " %02x", p[i]);
+ PerlIO_printf(PerlIO_stderr(), "\n");
+ PerlIO_printf(PerlIO_stderr(), "offset %d shift %d bit %#02x\n",
+ (int)NV_NAN_QS_BYTE_OFFSET, (int)NV_NAN_QS_BIT_SHIFT, (unsigned)NV_NAN_QS_BIT);
+ }
OUTPUT:
RETVAL
This fails at all optimization levels from -O0 through -O3.
--
Summary of my perl5 (revision 5 version 23 subversion 2) configuration:
Derived from: d218c3b757387fb6067599e2d3991945b37b0eac
Platform:
osname=cygwin, osvers=2.1.0(0.28753), archname=cygwin-64int
uname='cygwin_nt-6.1-wow saturn 2.1.0(0.28753) 2015-07-14 21:26 i686 cygwin '
config_args='-des -Dusedevel -Uusethreads -Doptimize=-O2'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2',
optimize='-O2',
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion='', gccversion='4.9.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/lib/gcc/i686-pc-cygwin/4.9.3/include-fixed /usr/lib /usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../include/w32api /usr/local/lib /lib
libs=-lpthread -ldl -lcrypt
perllibs=-lpthread -ldl -lcrypt
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_23_2.dll
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MYMALLOC PERLIO_LAYERS PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_USE_DEVEL
PERL_USE_SAFE_PUTENV 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:
uncommitted-changes
Built under cygwin
Compiled at Jul 29 2015 10:23:46
@INC:
lib
/usr/local/lib/perl5/site_perl/5.23.2/cygwin-64int
/usr/local/lib/perl5/site_perl/5.23.2
/usr/local/lib/perl5/5.23.2/cygwin-64int
/usr/local/lib/perl5/5.23.2
/usr/local/lib/perl5/site_perl
.
# Please include the string: [perl #125710]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=125710 >
Test Summary Report
-------------------
../ext/POSIX/t/math.t (Wstat: 256 Tests: 136 Failed: 1)
Failed test: 123
Non-zero exit status: 1
Files=1, Tests=136, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.05 cusr 0.11 csys = 0.17 CPU)
Result: FAIL
I enabled NV_PAYLOAD_DEBUG and later added some extra debugging code to the issignalling() XS code, for the failing test this produced:
a[0] = 0x12345
set p[ 0] = 45 (i = 0, m = ff, s = 0, b = 45, u = 00000045)
set p[ 1] = 23 (i = 1, m = ff, s = 8, b = 23, u = 00002300)
set p[ 2] = 01 (i = 2, m = ff, s = 16, b = 01, u = 00010000)
set p[ 3] = 00 (i = 3, m = ff, s = 24, b = 00, u = 00000000)
set p[ 4] = 00 (i = 4, m = ff, s = 32, b = 00, u = 00000000)
set p[ 5] = 00 (i = 5, m = ff, s = 40, b = 00, u = 00000000)
set p[ 6] = f8 (i = 6, m = 07, s = 48, b = 00, u = 00000000)
45 23 01 00 00 00 f0 ff
a[0] = 12345
45 23 01 00 00 00 f8 ff
issig: 45 23 01 00 00 00 f8 ff
offset 6 shift 3 bit 0x8
# Failed test 'setpayloadsig + issignaling'
# at t/math.t line 176.
where the extra code is:
@@ -2710,6 +2710,15 @@ issignaling(nv)
NV nv
CODE:
RETVAL = Perl_isnan(nv) && NV_NAN_IS_SIGNALING(&nv);
+ { unsigned i;
+ unsigned char *p = (unsigned char *)&nv;
+ PerlIO_printf(PerlIO_stderr(), "issig:");
+ for (i = 0; i < sizeof(NV); ++i)
+ PerlIO_printf(PerlIO_stderr(), " %02x", p[i]);
+ PerlIO_printf(PerlIO_stderr(), "\n");
+ PerlIO_printf(PerlIO_stderr(), "offset %d shift %d bit %#02x\n",
+ (int)NV_NAN_QS_BYTE_OFFSET, (int)NV_NAN_QS_BIT_SHIFT, (unsigned)NV_NAN_QS_BIT);
+ }
OUTPUT:
RETVAL
This fails at all optimization levels from -O0 through -O3.
--
Summary of my perl5 (revision 5 version 23 subversion 2) configuration:
Derived from: d218c3b757387fb6067599e2d3991945b37b0eac
Platform:
osname=cygwin, osvers=2.1.0(0.28753), archname=cygwin-64int
uname='cygwin_nt-6.1-wow saturn 2.1.0(0.28753) 2015-07-14 21:26 i686 cygwin '
config_args='-des -Dusedevel -Uusethreads -Doptimize=-O2'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2',
optimize='-O2',
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion='', gccversion='4.9.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/lib/gcc/i686-pc-cygwin/4.9.3/include-fixed /usr/lib /usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../include/w32api /usr/local/lib /lib
libs=-lpthread -ldl -lcrypt
perllibs=-lpthread -ldl -lcrypt
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_23_2.dll
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MYMALLOC PERLIO_LAYERS PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_USE_DEVEL
PERL_USE_SAFE_PUTENV 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:
uncommitted-changes
Built under cygwin
Compiled at Jul 29 2015 10:23:46
@INC:
lib
/usr/local/lib/perl5/site_perl/5.23.2/cygwin-64int
/usr/local/lib/perl5/site_perl/5.23.2
/usr/local/lib/perl5/5.23.2/cygwin-64int
/usr/local/lib/perl5/5.23.2
/usr/local/lib/perl5/site_perl
.