Bug#742818: fix test failures when built with GCC 4.9
On Sun, Mar 30, 2014 at 02:21:05PM +0300, Niko Tyni wrote: forwarded 742818 https://rt.perl.org/Ticket/Display.html?id=121505 thanks * Fix undefined behaviour in sv.c, resulting in test failures when built with GCC 4.9. Patch by Marek Polacek. Marek also supplied fixes for other similar cases of undefined behaviour, and those were present in the 5.18.2-2ubuntu1 patch. I'll wait a while for upstream to comment, but I expect this will be in our next upload. While there isn't much discussion in the ticket, there were some around http://www.nntp.perl.org/group/perl.perl5.porters/2014/03/msg214103.html There's a concern that this problem is more widespread. Upstream is considering enabling the gcc '-fwrapv' option to get the desired behaviour in such cases. -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#742818: fix test failures when built with GCC 4.9
forwarded 742818 https://rt.perl.org/Ticket/Display.html?id=121505 thanks On Fri, Mar 28, 2014 at 10:12:43PM +0100, Matthias Klose wrote: Am 28.03.2014 21:24, schrieb Niko Tyni: On Fri, Mar 28, 2014 at 01:54:02PM +0100, Matthias Klose wrote: Am 28.03.2014 13:09, schrieb Niko Tyni: tag 742818 confirmed upstream thanks On Thu, Mar 27, 2014 at 08:03:42PM +0100, Matthias Klose wrote: Package: perl Version: 5.18.2-2 Severity: important Tags: sid jessie patch * Fix undefined behaviour in sv.c, resulting in test failures when built with GCC 4.9. Patch by Marek Polacek. patch at http://launchpadlibrarian.net/170687513/perl_5.18.2-2_5.18.2-2ubuntu1.diff.gz Could you please supply a build log of a successful 5.18.2-2ubuntu1 build with gcc-4.9 so I could try to find the difference? attached. Somehow you seem to be building with a different patch than the one in Launchpad. The Launchpad one really is missing the actual fix for the test suite failures. Luckily Marek Polacek included it in his upstream ticket. --- sv.c.bak2014-03-24 15:11:48.007595042 +0100 +++ sv.c2014-03-25 11:57:41.154752451 +0100 @@ -2008,7 +2008,7 @@ S_sv_2iuv_common(pTHX_ SV *const sv) if (SvNVX(sv) == (NV) SvIVX(sv) #ifndef NV_PRESERVES_UV (((UV)1 NV_PRESERVES_UV_BITS) - (UV)(SvIVX(sv) 0 ? SvIVX(sv) : -SvIVX(sv))) + (UV)(SvIVX(sv) 0 ? SvIVX(sv) : -SvUVX(sv))) /* Don't flag it as accurately an integer if the number came from a (by definition imprecise) NV operation, and we're outside the range of NV integer precision */ Marek also supplied fixes for other similar cases of undefined behaviour, and those were present in the 5.18.2-2ubuntu1 patch. I'll wait a while for upstream to comment, but I expect this will be in our next upload. -- Niko -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#742818: fix test failures when built with GCC 4.9
tag 742818 confirmed upstream thanks On Thu, Mar 27, 2014 at 08:03:42PM +0100, Matthias Klose wrote: Package: perl Version: 5.18.2-2 Severity: important Tags: sid jessie patch * Fix undefined behaviour in sv.c, resulting in test failures when built with GCC 4.9. Patch by Marek Polacek. patch at http://launchpadlibrarian.net/170687513/perl_5.18.2-2_5.18.2-2ubuntu1.diff.gz Thanks. I've confirmed test failures with gcc-4.9 4.9-20140322-1 from experimental on both i386 and amd64. However, the above patch doesn't seem to fix them here. Could you verify it really works for you? FWIW I added -Dcc=gcc-4.9 in debian/config.debian for testing. Are you replacing /usr/bin/gcc or something like that? (I've also tested that the bug exists on upstream blead, as of v5.19.10-18-g61eca82, so tagging this 'upstream'.) Test Summary Report --- op/numconvert.t (Wstat: 0 Tests: 1444 Failed: 12) Failed tests: 104, 108, 112, 136, 140, 144, 152, 156 160, 168, 172, 176 op/range.t (Wstat: 0 Tests: 141 Failed: 25) Failed tests: 84-95, 99-111 Files=2, Tests=1585, 0 wallclock secs ( 0.10 usr 0.00 sys + 0.16 cusr 0.00 csys = 0.26 CPU) Result: FAIL $ LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness op/numconvert.t op/range.t op/numconvert.t .. # '-9223372036854775808' ne '-9.22337203685478e+18', -1.84467440737096e+19 = I - N P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - N P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9.22337203685478e+18 = I - N P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = I - N P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',9223372036854775808 = I - N P vs I - P # Failed test 104 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = N - N P vs N - P # Failed test 108 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = P - N P vs P - P # Failed test 112 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - u P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - u P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9.22337203685478e+18 = I - u P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = I - u P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',9223372036854775808 = I - u P vs I - P # Failed test 136 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = N - u P vs N - P # Failed test 140 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = P - u P vs P - P # Failed test 144 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - i P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - i P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9.22337203685478e+18 = I - i P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = I - i P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',9223372036854775808 = I - i P vs I - P # Failed test 152 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = N - i P vs N - P # Failed test 156 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = P - i P vs P - P # Failed test 160 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - n P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-1.84467440737096e+19 = I - n P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9.22337203685478e+18 = I - n P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = I - n P vs I - P # '-9223372036854775808' ne '-9.22337203685478e+18',9223372036854775808 = I - n P vs I - P # Failed test 168 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = N - n P vs N - P # Failed test 172 - at op/numconvert.t line 247 # '-9223372036854775808' ne '-9.22337203685478e+18',-9223372036854775808 = P - n P vs P - P # Failed test 176 - at op/numconvert.t line 247 op/numconvert.t .. Failed 12/1444 subtests op/range.t ... # Failed test 84 - Lower bound accepted: -9223372036854775807 at op/range.t line 289 # Failed test 85 - Lower bound okay at op/range.t line 290 # got undef # expected -9223372036854775807 # Failed test 86 - Upper bound okay at op/range.t line 291
Bug#742818: fix test failures when built with GCC 4.9
On Fri, Mar 28, 2014 at 01:54:02PM +0100, Matthias Klose wrote: Am 28.03.2014 13:09, schrieb Niko Tyni: tag 742818 confirmed upstream thanks On Thu, Mar 27, 2014 at 08:03:42PM +0100, Matthias Klose wrote: Package: perl Version: 5.18.2-2 Severity: important Tags: sid jessie patch * Fix undefined behaviour in sv.c, resulting in test failures when built with GCC 4.9. Patch by Marek Polacek. patch at http://launchpadlibrarian.net/170687513/perl_5.18.2-2_5.18.2-2ubuntu1.diff.gz Thanks. I've confirmed test failures with gcc-4.9 4.9-20140322-1 from experimental on both i386 and amd64. However, the above patch doesn't seem to fix them here. Could you verify it really works for you? I checked this with a test rebuild on trusty, which did succeed and didn't fail the tests. FWIW I added -Dcc=gcc-4.9 in debian/config.debian for testing. Are you replacing /usr/bin/gcc or something like that? yes, I installed the gcc-defaults packages from experimental. Sorry to be a bother, but I'm afraid I still can't get the test suite to pass with gcc-4.9 and the patch. I tried to build the actual 5.18.2-2ubuntu1 package in a trusty amd64 chroot, with gcc_4:4.9-1exp1 and gcc-4.9_4.9-20140322-1 from Debian experimental. I'm still seeing Failed 2 tests out of 2328, 99.91% okay. op/numconvert.t op/range.t Could you please supply a build log of a successful 5.18.2-2ubuntu1 build with gcc-4.9 so I could try to find the difference? -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#742818: fix test failures when built with GCC 4.9
Package: perl Version: 5.18.2-2 Severity: important Tags: sid jessie patch * Fix undefined behaviour in sv.c, resulting in test failures when built with GCC 4.9. Patch by Marek Polacek. patch at http://launchpadlibrarian.net/170687513/perl_5.18.2-2_5.18.2-2ubuntu1.diff.gz -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org