In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/cb3731263d5491bdad2b9adba26dab94331066ac?hp=a767af75c1ae7077a71113d6c99c2b7a7c72a9b0>
- Log ----------------------------------------------------------------- commit cb3731263d5491bdad2b9adba26dab94331066ac Author: H.Merijn Brand - Tux <[email protected]> Date: Wed Nov 23 16:32:39 2016 +0100 Zero out high bytes of 80-bit ldnan 1. Backport of dd6885360b15e763e0706dc28555eea328de432d fix garbage filtering with 80-bit long doubles The test had several problems that resulted in the excess bytes not getting zeroed out. This caused random contents in $Config{longdblinfbytes}, observed on Debian with GCC 6.2.0 (but not 5.4.1). Bug-Debian: https://bugs.debian.org/844752 2. Backport of 6b2c7479d6d33249c2385d8a36d8ee9e61e1a519 also zero out high bytes of 80-bit ldnan These are currently zero anyway, but things are probably not guaranteed to stay so. ----------------------------------------------------------------------- Summary of changes: U/perl/infnan.U | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/U/perl/infnan.U b/U/perl/infnan.U index b09e1f0..7a248cd 100644 --- a/U/perl/infnan.U +++ b/U/perl/infnan.U @@ -54,8 +54,8 @@ $cat >try.c <<EOP #define DOUBLESIZE $doublesize #$d_longdbl HAS_LONG_DOUBLE #ifdef HAS_LONG_DOUBLE -#define LONGDBLSIZE $longdblsize -#define LONGDBLKIND $longdblkind +#define LONG_DOUBLESIZE $longdblsize +#define LONG_DOUBLEKIND $longdblkind #endif #$i_math I_MATH #ifdef I_MATH @@ -92,16 +92,15 @@ int main(int argc, char *argv[]) { #ifdef HAS_LONG_DOUBLE long double ldinf = (long double)exp(1e9); long double ldnan = (long double)sqrt(-1.0); -#endif - if (argc == 2) { - switch (argv[1][0]) { - case '1': bytes(&dinf, sizeof(dinf)); break; - case '2': bytes(&dnan, sizeof(dnan)); break; -#ifdef HAS_LONG_DOUBLE # if LONG_DOUBLEKIND == 3 || LONG_DOUBLEKIND == 4 /* the 80-bit long doubles might have garbage in their excess bytes */ memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10); + memset((char *)&ldnan + 10, '\0', LONG_DOUBLESIZE - 10); # endif + if (argc == 2) { + switch (argv[1][0]) { + case '1': bytes(&dinf, sizeof(dinf)); break; + case '2': bytes(&dnan, sizeof(dnan)); break; case '3': bytes(&ldinf, sizeof(ldinf)); break; case '4': bytes(&ldnan, sizeof(ldnan)); break; #endif -- perl5 metaconfig repository
