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]: Commit 60fa466 breaks SMUELLER/Math-Clipper-1.23.tar.gz #16388

Closed
p5pRT opened this issue Jan 27, 2018 · 7 comments
Closed

[BBC]: Commit 60fa466 breaks SMUELLER/Math-Clipper-1.23.tar.gz #16388

p5pRT opened this issue Jan 27, 2018 · 7 comments
Labels
BBC

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Jan 27, 2018

Migrated from rt.perl.org#132775 (status was 'resolved')

Searchable as RT132775$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 27, 2018

From @eserte

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.27.8.


t/008integerize.t started to fail with 5.27.8, and was OK until
5.27.7 (sorry, I have no bisect result available)​:

# Failed test 'rounding'
# at t/008integerize.t line 208.
# Comparing $data as a Bag
# Missing​: 1 reference
# Extra​: 1 reference
# Looks like you failed 1 test of 15.
t/008integerize.t ........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/15 subtests



Flags​:
  category=core
  severity=low


Site configuration information for perl 5.27.8​:

Configured by eserte at Sat Jan 20 09​:22​:10 CET 2018.

Summary of my perl5 (revision 5 version 27 subversion 8) configuration​:
 
  Platform​:
  osname=linux
  osvers=3.16.0-4-amd64
  archname=x86_64-linux
  uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-12-13) x86_64 gnulinux '
  config_args='-ds -e -Dprefix=/opt/perl-5.27.8 -Dusedevel -Dusemallocwrap=no -Dcf_email=srezic@​cpan.org'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  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='4.9.2'
  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/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.19'
  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.27.8​:
  /opt/perl-5.27.8/lib/site_perl/5.27.8/x86_64-linux
  /opt/perl-5.27.8/lib/site_perl/5.27.8
  /opt/perl-5.27.8/lib/5.27.8/x86_64-linux
  /opt/perl-5.27.8/lib/5.27.8


Environment for perl 5.27.8​:
  HOME=/home/eserte
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/home/eserte/bin/linux-gnu​:/home/eserte/bin/sh​:/home/eserte/bin​:/home/eserte/bin/pistachio-perl/bin​:/usr/games​:/home/eserte/devel
  PERLDOC=-MPod​::Perldoc​::ToTextOverstrike
  PERL_BADLANG (unset)
  SHELL=/bin/zsh

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 27, 2018

From @eserte

Dana Sat, 27 Jan 2018 07​:27​:38 -0800, slaven@​rezic.de reče​:

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.27.8.

-----------------------------------------------------------------
t/008integerize.t started to fail with 5.27.8, and was OK until
5.27.7 (sorry, I have no bisect result available)​:

# Failed test 'rounding'
# at t/008integerize.t line 208.
# Comparing $data as a Bag
# Missing​: 1 reference
# Extra​: 1 reference
# Looks like you failed 1 test of 15.
t/008integerize.t ........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/15 subtests

-----------------------------------------------------------------
---
Flags​:
category=core
severity=low
---
Site configuration information for perl 5.27.8​:

Configured by eserte at Sat Jan 20 09​:22​:10 CET 2018.

Summary of my perl5 (revision 5 version 27 subversion 8)
configuration​:

Platform​:
osname=linux
osvers=3.16.0-4-amd64
archname=x86_64-linux
uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-
12-13) x86_64 gnulinux '
config_args='-ds -e -Dprefix=/opt/perl-5.27.8 -Dusedevel
-Dusemallocwrap=no -Dcf_email=srezic@​cpan.org'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
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='4.9.2'
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/gcc/x86_64-linux-gnu/4.9/include-
fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
-lgdbm_compat
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.19'
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.27.8​:
/opt/perl-5.27.8/lib/site_perl/5.27.8/x86_64-linux
/opt/perl-5.27.8/lib/site_perl/5.27.8
/opt/perl-5.27.8/lib/5.27.8/x86_64-linux
/opt/perl-5.27.8/lib/5.27.8

---
Environment for perl 5.27.8​:
HOME=/home/eserte
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/home/eserte/bin/linux-
gnu​:/home/eserte/bin/sh​:/home/eserte/bin​:/home/eserte/bin/pistachio-
perl/bin​:/usr/games​:/home/eserte/devel
PERLDOC=-MPod​::Perldoc​::ToTextOverstrike
PERL_BADLANG (unset)
SHELL=/bin/zsh

If anybody wants to bisect this one --- don't do it with a -Duselongdouble perl, as the distribution's test suite has a known problem here.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 27, 2018

From @jkeenan

On Sat, 27 Jan 2018 15​:27​:38 GMT, slaven@​rezic.de wrote​:

This is a bug report for perl from slaven@​rezic.de,
generated with the help of perlbug 1.41 running under perl 5.27.8.

-----------------------------------------------------------------
t/008integerize.t started to fail with 5.27.8, and was OK until
5.27.7 (sorry, I have no bisect result available)​:

# Failed test 'rounding'
# at t/008integerize.t line 208.
# Comparing $data as a Bag
# Missing​: 1 reference
# Extra​: 1 reference
# Looks like you failed 1 test of 15.
t/008integerize.t ........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/15 subtests

Bisection points to​:

#####
60fa466 is the first bad commit
commit 60fa466
Author​: Zefram <zefram@​fysh.org>
Date​: Fri Jan 19 05​:05​:07 2018 +0000

  fix F0convert() on edge cases
 
The F0convert() function used to implement the %.0f format specifier more cheaply went wrong on some edge cases. Its rounding went wrong when the exponent is such that fractional values are not representable, making the "+= 0.5" invoke floating point rounding. Fix that by only invoking that rounding logic for values that start out fractional. That fixes the output part of [perl #47602]. It also failed to emit the sign for negative zero. Fix that by making it not apply to zero values.

:100644 100644 2c13b3b3338fefd5ae8740312f837449f017118f 6ad33c0bfc96572d236638441b089b042afcd43a M sv.c
:040000 040000 c2d3748e4aa975205765013f0386fafa19372f7f 2aed33bffd807ca1eb42fa34df79406cbcec7730 M t
bisect run success
That took 2312 seconds.
#####

Thank you very much.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 27, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 28, 2018

From zefram@fysh.org

slaven@​rezic.de wrote​:

# Failed test 'rounding'
# at t/008integerize.t line 208.

It's failing due to the new correct output for sprintf("%.0f", -0.0).
It is only the test that is erroneous. The processing in that file uses
the module's integerize_coordinate_sets() sub to round a -0.4 value,
for which it gets the entirely reasonable result of -0.0. It compares
this against an expected result of 0 (implemented as an integer zero)
by applying sprintf("%.0f", $_) to both and string-comparing the results.

There are two possible fixes for the test. One is to change the value
in its expected-result data structure to a negative zero. That would
have the effect of testing that the sub under test produces the negative
zero where expected. The other option is to alter the way values are
canonicalised for comparison to drop the sign from zeroes. That would
have the effect of ignoring the sign of zero.

-zefram

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Apr 20, 2018

From @iabyn

On Sun, Jan 28, 2018 at 01​:42​:29PM +0000, Zefram wrote​:

slaven@​rezic.de wrote​:

# Failed test 'rounding'
# at t/008integerize.t line 208.

It's failing due to the new correct output for sprintf("%.0f", -0.0).
It is only the test that is erroneous. The processing in that file uses
the module's integerize_coordinate_sets() sub to round a -0.4 value,
for which it gets the entirely reasonable result of -0.0. It compares
this against an expected result of 0 (implemented as an integer zero)
by applying sprintf("%.0f", $_) to both and string-comparing the results.

There are two possible fixes for the test. One is to change the value
in its expected-result data structure to a negative zero. That would
have the effect of testing that the sub under test produces the negative
zero where expected. The other option is to alter the way values are
canonicalised for comparison to drop the sign from zeroes. That would
have the effect of ignoring the sign of zero.

Since its an issue with the distribution, I'll close this ticket.

I've created a cpan.rt ticket for the issue​:

  https://rt.cpan.org/Ticket/Display.html?id=125139

--
If life gives you lemons, you'll probably develop a citric acid allergy.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Apr 20, 2018

@iabyn - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Apr 20, 2018
@p5pRT p5pRT added BBC Severity Low labels Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC
Projects
None yet
Development

No branches or pull requests

1 participant