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

Bleadperl v5.21.3-113-g8c12dc6 breaks CHOCOLATE/Scalar-Util-Numeric-0.22.tar.gz #14114

Closed
p5pRT opened this issue Sep 24, 2014 · 10 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Sep 24, 2014

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

Searchable as RT122843$

@p5pRT
Copy link
Author

p5pRT commented Sep 24, 2014

From @andk

git bisect


commit 8c12dc6
Author​: Jarkko Hietaniemi <jhi@​iki.fi>
Date​: Sat Aug 23 22​:49​:04 2014 -0400

  More robust inf/nan recognition and generation.

sample fail report


http​://www.cpantesters.org/cpan/report/fef572c0-2c93-11e4-b7c9-7fcbcc4edbc1

perl -V


Summary of my perl5 (revision 5 version 21 subversion 4) configuration​:
  Commit id​: 35c2140
  Platform​:
  osname=linux, osvers=3.14-2-amd64, archname=x86_64-linux-ld
  uname='linux k83 3.14-2-amd64 #1 smp debian 3.14.15-2 (2014-08-09) x86_64 gnulinux '
  config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3-121-g35c2140/127e -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Uuseithreads -Duselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  use64bitint=define, use64bitall=define, uselongdouble=define
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
  optimize='-O2 -g',
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.9.1', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
  ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
  alignbytes=16, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -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=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-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 -g -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
  PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
  USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
  USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF
  Built under linux
  Compiled at Aug 25 2014 08​:06​:32
  %ENV​:
  PERL5LIB=""
  PERL5OPT=""
  PERL5_CPANPLUS_IS_RUNNING="8266"
  PERL5_CPAN_IS_RUNNING="8266"
  PERL_MM_USE_DEFAULT="1"
  @​INC​:
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3-121-g35c2140/127e/lib/site_perl/5.21.4/x86_64-linux-ld
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3-121-g35c2140/127e/lib/site_perl/5.21.4
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3-121-g35c2140/127e/lib/5.21.4/x86_64-linux-ld
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.3-121-g35c2140/127e/lib/5.21.4
  .
--
andreas

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2014

From @schwern

Those are all tests for what should be invalid numbers. "near-misses (wrong spelling and wrong case) for the Win32 Inf and NaN. these should be invalid numbers on all platforms". I added some annotation to the tests to find out what exactly failed.

!isnan(1.#InD)
!isnan(-1.#InD)
!isinf(1.#InF)
!isinf(-1.#InF)

1.#InF and -1.#InF are considered infinity.
1.#InD and -1.#iND are considered NaN.

I'm no number wizard, but it looks like a regression in perl. I'll leave it to y'all to decide.

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2014

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

@p5pRT
Copy link
Author

p5pRT commented Oct 9, 2014

From @andk

Also affected​:
CMS/Mustache-Simple-v1.3.1.tar.gz
http​://www.cpantesters.org/cpan/report/76da0bc2-4c72-11e4-9aeb-3e61e0bfc7aa
--
andreas

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @arc

Michael G Schwern via RT <perlbug-followup@​perl.org> wrote​:

Those are all tests for what should be invalid numbers. "near-misses (wrong spelling and wrong case) for the Win32 Inf and NaN. these should be invalid numbers on all platforms". I added some annotation to the tests to find out what exactly failed.

!isnan(1.#InD)
!isnan(-1.#InD)
!isinf(1.#InF)
!isinf(-1.#InF)

1.#InF and -1.#InF are considered infinity.
1.#InD and -1.#iND are considered NaN.

I'm no number wizard, but it looks like a regression in perl. I'll leave it to y'all to decide.

This looks to me like the result of a deliberate change in Perl​:
grok_number() now accepts the Win32-style "1.#INF" and "1.#IND"
strings in any letter-case variants.

My view is that the Scalar​::Util​::Numeric test suite should change to
be happy for Perl to treat mixed-case "1.#InF" and "1.#InD" as
variants of the upper-case equivalents, and I've got a suitable patch
ready to submit to S​::U​::N. But I thought it would be worth checking
for dissenting opinions first; Jarkko, do you have a view on this?

--
Aaron Crane ** http​://aaroncrane.co.uk/

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @arc

Andreas Koenig <andreas.koenig.7os6VVqR@​franz.ak.mind.de> wrote​:

Also affected​:
CMS/Mustache-Simple-v1.3.1.tar.gz
http​://www.cpantesters.org/cpan/report/76da0bc2-4c72-11e4-9aeb-3e61e0bfc7aa

This looks like a genuine regression. This reduction prints "matched"
under 5.18 and 5.20, but not under blead​:

no warnings "experimental​::smartmatch";
my $x = "Ind";
$x + 0;
"Ind" ~~ $_ and print "matched\n" for $x;

--
Aaron Crane ** http​://aaroncrane.co.uk/

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @arc

Aaron Crane <arc@​cpan.org> wrote​:

My view is that the Scalar​::Util​::Numeric test suite should change to
be happy for Perl to treat mixed-case "1.#InF" and "1.#InD" as
variants of the upper-case equivalents, and I've got a suitable patch
ready to submit to S​::U​::N. But I thought it would be worth checking
for dissenting opinions first; Jarkko, do you have a view on this?

In private communication, Jarkko has concurred with my assessment.
I've submitted a patch for Scalar​::Util​::Numeric here​:

https://github.com/chocolateboy/Scalar-Util-Numeric/pull/2

--
Aaron Crane ** http​://aaroncrane.co.uk/

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @jhi

On Monday-201410-20, 18​:03, Aaron Crane wrote​:

no warnings "experimental​::smartmatch";
my $x = "Ind";
$x + 0;
"Ind" ~~ $_ and print "matched\n" for $x;

Huh? ... Oh, okay. Something is definitely broken here... mea culpa,
though I need to find out where the culpa exactly is.

("Ind" + 0 returns 'NaN'.)

It shouldn't trigger on its own, like "inf" and "nan" do,
only as part of the win32y "1.#ind".

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2014

From @jhi

On Monday-201410-20, 18​:13, Jarkko Hietaniemi wrote​:

On Monday-201410-20, 18​:03, Aaron Crane wrote​:

no warnings "experimental​::smartmatch";
my $x = "Ind";
$x + 0;
"Ind" ~~ $_ and print "matched\n" for $x;

Huh? ... Oh, okay. Something is definitely broken here... mea culpa,
though I need to find out where the culpa exactly is.

("Ind" + 0 returns 'NaN'.)

It shouldn't trigger on its own, like "inf" and "nan" do,
only as part of the win32y "1.#ind".

e855f54

@p5pRT p5pRT closed this as completed Oct 21, 2014
@p5pRT
Copy link
Author

p5pRT commented Oct 21, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant