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

t/op/sprintf2.t: 6 test failures when compiling with g++7 #16441

Closed
p5pRT opened this issue Feb 26, 2018 · 10 comments
Closed

t/op/sprintf2.t: 6 test failures when compiling with g++7 #16441

p5pRT opened this issue Feb 26, 2018 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 26, 2018

Migrated from rt.perl.org#132913 (status was 'open')

Searchable as RT132913$

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jkeenan

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jkeenan

# Failed test 1530 - subnormal 0x1.fffffffffffffp-1022 %a 0x1.fffffffffffffp-1022 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.fffffffffffffp-1022"
# Failed test 1531 - subnormal 0x0.fffffffffffffp-1022 %a 0x1.ffffffffffffep-1023 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.ffffffffffffep-1023"
# Failed test 1532 - subnormal 0x0.7ffffffffffffp-1022 %a 0x1.ffffffffffffcp-1024 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.ffffffffffffcp-1024"
# Failed test 1533 - subnormal 0x0.3ffffffffffffp-1022 %a 0x1.ffffffffffff8p-1025 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.ffffffffffff8p-1025"
# Failed test 1534 - subnormal 0x0.1ffffffffffffp-1022 %a 0x1.ffffffffffffp-1026 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.ffffffffffffp-1026"
# Failed test 1535 - subnormal 0x0.0ffffffffffffp-1022 %a 0x1.fffffffffffep-1027 got 0x0p+0 at op/sprintf2.t line 812
# got "0x0p+0"
# expected "0x1.fffffffffffep-1027"
op/sprintf2.t ..
# uvsize = 8
# nvsize = 8
# nv_preserves_uv_bits = 53
# d_quad = define
# uselongdouble = undef
ok 1 - the sprintf "%.<number>g" optimization
ok 2 - the sprintf "%.<number>f" optimization
ok 3 - width calculation under utf8 upgrade, length=1
ok 4 - width calculation under utf8 upgrade, length=5
ok 5 - width calculation under utf8 upgrade, length=10
ok 6 - width calculation under utf8 upgrade, length=20
ok 7 - width calculation under utf8 upgrade, length=50
ok 8 - width calculation under utf8 upgrade, length=100
ok 9 - width & precision interplay with utf8 strings, length=1
ok 10 - width & precision interplay with utf8 strings, length=3
ok 11 - width & precision interplay with utf8 strings, length=5
ok 12 - width & precision interplay with utf8 strings, length=10
...
ok 1505 - subnormal 1e-320 %a 0x1.fap-1064 got 0x1.fap-1064
ok 1506 - subnormal 1e-321 %a 0x1.94p-1067 got 0x1.94p-1067
ok 1507 - subnormal 1e-322 %a 0x1.4p-1070 got 0x1.4p-1070
ok 1508 - subnormal 1e-323 %a 0x1p-1073 got 0x1p-1073
ok 1509 - subnormal 1e-324 %a 0x0p+0 got 0x0p+0
ok 1510 - subnormal 3e-320 %a 0x1.7b8p-1062 got 0x1.7b8p-1062
ok 1511 - subnormal 3e-321 %a 0x1.2f8p-1065 got 0x1.2f8p-1065
ok 1512 - subnormal 3e-322 %a 0x1.e8p-1069 got 0x1.e8p-1069
ok 1513 - subnormal 3e-323 %a 0x1.8p-1072 got 0x1.8p-1072
ok 1514 - subnormal 3e-324 %a 0x1p-1074 got 0x1p-1074
ok 1515 - subnormal 7e-320 %a 0x1.bacp-1061 got 0x1.bacp-1061
ok 1516 - subnormal 7e-321 %a 0x1.624p-1064 got 0x1.624p-1064
ok 1517 - subnormal 7e-322 %a 0x1.1cp-1067 got 0x1.1cp-1067
ok 1518 - subnormal 7e-323 %a 0x1.cp-1071 got 0x1.cp-1071
ok 1519 - subnormal 7e-324 %a 0x1p-1074 got 0x1p-1074
ok 1520 - subnormal 3e-320 %.4a 0x1.7b80p-1062 got 0x1.7b80p-1062
ok 1521 - subnormal 3e-321 %.4a 0x1.2f80p-1065 got 0x1.2f80p-1065
ok 1522 - subnormal 3e-322 %.4a 0x1.e800p-1069 got 0x1.e800p-1069
ok 1523 - subnormal 3e-323 %.4a 0x1.8000p-1072 got 0x1.8000p-1072
ok 1524 - subnormal 3e-324 %.4a 0x1.0000p-1074 got 0x1.0000p-1074
ok 1525 - subnormal 3e-320 %.1a 0x1.8p-1062 got 0x1.8p-1062
ok 1526 - subnormal 3e-321 %.1a 0x1.3p-1065 got 0x1.3p-1065
ok 1527 - subnormal 3e-322 %.1a 0x1.ep-1069 got 0x1.ep-1069
ok 1528 - subnormal 3e-323 %.1a 0x1.8p-1072 got 0x1.8p-1072
ok 1529 - subnormal 3e-324 %.1a 0x1.0p-1074 got 0x1.0p-1074
not ok 1530 - subnormal 0x1.fffffffffffffp-1022 %a 0x1.fffffffffffffp-1022 got 0x0p+0
not ok 1531 - subnormal 0x0.fffffffffffffp-1022 %a 0x1.ffffffffffffep-1023 got 0x0p+0
not ok 1532 - subnormal 0x0.7ffffffffffffp-1022 %a 0x1.ffffffffffffcp-1024 got 0x0p+0
not ok 1533 - subnormal 0x0.3ffffffffffffp-1022 %a 0x1.ffffffffffff8p-1025 got 0x0p+0
not ok 1534 - subnormal 0x0.1ffffffffffffp-1022 %a 0x1.ffffffffffffp-1026 got 0x0p+0
not ok 1535 - subnormal 0x0.0ffffffffffffp-1022 %a 0x1.fffffffffffep-1027 got 0x0p+0
ok 1536
ok 1537
ok 1538 - [rt.perl.org \#128888]
ok 1539 - [rt.perl.org \#128889]
ok 1540
ok 1541
ok 1542 - [rt.perl.org \#128890]
ok 1543
ok 1544
...
ok 1696 - special-case %.0f on -4503599627370503
1..1696
Failed 6/1696 subtests
  (less 30 skipped subtests​: 1660 okay)

Test Summary Report


op/sprintf2.t (Wstat​: 0 Tests​: 1696 Failed​: 6)
  Failed tests​: 1530-1535
Files=1, Tests=1696, 0 wallclock secs ( 0.10 usr 0.01 sys + 0.16 cusr 0.09 csys = 0.37 CPU)
Result​: FAIL

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jkeenan

Summary of my perl5 (revision 5 version 27 subversion 9) configuration​:
  Commit id​: 9fa1876
  Platform​:
  osname=freebsd
  osvers=11.0-release-p1
  archname=amd64-freebsd-thread-multi
  uname='freebsd kid51-freebsd-11-install-3 11.0-release-p1 freebsd 11.0-release-p1 #0 r306420​: thu sep 29 01​:43​:23 utc 2016 root@​releng2.nyi.freebsd.org​:usrobjusrsrcsysgeneric amd64 '
  config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing -Dcc=/usr/local/bin/g++7 -Accflags=-Wl,-rpath=/usr/local/lib/gcc7 -Aldflags=-Wl,-rpath=/usr/local/lib/gcc7'
  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='/usr/local/bin/g++7'
  ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -Wl,-rpath=/usr/local/lib/gcc7 -fwrapv -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 -Wl,-rpath=/usr/local/lib/gcc7 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='7.2.0'
  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/local/bin/g++7'
  ldflags ='-pthread -Wl,-E -Wl,-rpath=/usr/local/lib/gcc7 -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib /usr/local/lib/gcc7/include/c++/ /usr/local/lib/gcc7/include/c++//x86_64-portbld-freebsd11.1 /usr/local/lib/gcc7/include/c++//backward /usr/local/lib /usr/lib
  libs=-lpthread -lgdbm -lm -lcrypt -lutil
  perllibs=-lpthread -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 Feb 26 2018 11​:52​:18
  %ENV​:
  PERL2DIR="/home/jkeenan/gitwork/perl2"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.27.9/amd64-freebsd-thread-multi
  /usr/local/lib/perl5/site_perl/5.27.9
  /usr/local/lib/perl5/5.27.9/amd64-freebsd-thread-multi
  /usr/local/lib/perl5/5.27.9

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jkeenan

On Mon, 26 Feb 2018 17​:32​:31 GMT, jkeenan@​pobox.com wrote​:

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Thank you very much.
Jim Keenan

Curiously, if I configure with '-Dcc="gcc7" instead of g++7, the 6 tests now PASS.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From [Unknown Contact. See original ticket]

On Mon, 26 Feb 2018 17​:32​:31 GMT, jkeenan@​pobox.com wrote​:

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Thank you very much.
Jim Keenan

Curiously, if I configure with '-Dcc="gcc7" instead of g++7, the 6 tests now PASS.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jhi

On 2/26/18 19​:32, James E Keenan wrote​:

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Off-hand, since the only tests that started failing are to do with
subnormal handling, and since the tests have previously passed (right?)
with freebsd/gcc (some older gcc), maybe something has changed in the
subnormal handling?

CCing Zefram explicitly since he usually has a good hunch about these
things.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @jkeenan

On Mon, 26 Feb 2018 18​:27​:16 GMT, jhi wrote​:

On 2/26/18 19​:32, James E Keenan wrote​:

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Off-hand, since the only tests that started failing are to do with
subnormal handling, and since the tests have previously passed (right?)
with freebsd/gcc (some older gcc), maybe something has changed in the
subnormal handling?

I only installed gcc7 (and, hence, g++7) on FreeBSD-11.0 for the first time today.

I previously installed gcc6, but where was some problem installing g++6, so I've never built with the latter on this platform.

On IRC #p5p, Tux mentioned that he had observed g++7 test failures several months ago at the time of the core hackathon in Amsterdam (mid-October).

CCing Zefram explicitly since he usually has a good hunch about these
things.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Thank you very much.
Jim Keenan

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

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

@p5pRT
Copy link
Author

p5pRT commented Feb 26, 2018

From @Tux

On Mon, 26 Feb 2018 10​:57​:52 -0800, "James E Keenan via RT"
<perlbug-followup@​perl.org> wrote​:

On Mon, 26 Feb 2018 18​:27​:16 GMT, jhi wrote​:

On 2/26/18 19​:32, James E Keenan wrote​:

Today I installed the gcc7 package on both FreeBSD-10.3 and 11.0. I
then compiled and build perl configuring like this​:

#####
sh ./Configure -des -Dusedevel -Duseithreads \
-Doptimize="-O2 -pipe -fstack-protector -fno-strict-aliasing" \
-Dcc="g++7" \
-Accflags="-Wl,-rpath=/usr/local/lib/gcc7" \
-Aldflags="-Wl,-rpath=/usr/local/lib/gcc7"
#####

There were plenty of warnings during 'make', but since we have not yet
heavily explored building perl with gcc7 or g++7, I'll defer discussion
of them; 'make' completed successfully.

During 'make test_harness', however, I got failures in t/op/sprintf2.t.
Please see attachments.

Off-hand, since the only tests that started failing are to do with
subnormal handling, and since the tests have previously passed (right?)
with freebsd/gcc (some older gcc), maybe something has changed in the
subnormal handling?

I only installed gcc7 (and, hence, g++7) on FreeBSD-11.0 for the
first time today.

I previously installed gcc6, but where was some problem installing
g++6, so I've never built with the latter on this platform.

On IRC #p5p, Tux mentioned that he had observed g++7 test failures
several months ago at the time of the core hackathon in Amsterdam
(mid-October).

Several month being over a year now

It is g++-6 + g++-7 specific (g++-5 is ok)

Search on [All versions] for host [lx09] on http​://perl5.test-smoke.org/search

Last pass​: 2016-06-02 13​:31​:52+00 v5.25.1-98-gad1bab9
  http​://perl5.test-smoke.org/report/47121
  lx09​: Intel(R) Core(TM) i7-2620M CPU @​ 2.70GHz (GenuineIntel 1377MHz) (x86_64/4[8 cores] cpus)
  on linux 4.6.0-1-default [openSUSE Tumbleweed (20160422) (x86_64)]
  using g++ version 5.3.1 20160412 [gcc-5-branch revision 234894] (*1)
  smoketime 4 hours 18 minutes (average 32 minutes 21 seconds)

First fail​: 2016-08-27 19​:55​:14+00 v5.25.4-21-g51068c1
  http​://perl5.test-smoke.org/report/49402
  lx09​: Intel(R) Core(TM) i7-2620M CPU @​ 2.70GHz (GenuineIntel 1385MHz) (x86_64/4[8 cores] cpus)
  on linux 4.7.2-1-default [openSUSE Tumbleweed (20160812) (x86_64)]
  using g++ version 6.1.1 20160815 [gcc-6-branch revision 239479] (*1)
  smoketime 2 hours 33 minutes (average 19 minutes 9 seconds)

CCing Zefram explicitly since he usually has a good hunch about these
things.

Note that we have one other long-standing Open ticket for t/op/sprintf2.t​:

https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122591

Jim Keenan

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.27 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@jkeenan
Copy link
Contributor

jkeenan commented Feb 2, 2020

This was fixed by Hugo in commit a06a4d4; closing.

@jkeenan jkeenan closed this as completed Feb 2, 2020
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

2 participants