develooper Front page | perl.perl5.porters | Postings from November 2016

[perl #130133] [PATCH] Configure leaves garbage in$Config{longdblinfbytes}

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
November 18, 2016 21:59
Subject:
[perl #130133] [PATCH] Configure leaves garbage in$Config{longdblinfbytes}
Message ID:
rt-4.0.24-6473-1479506375-786.130133-15-0@perl.org
On Fri, 18 Nov 2016 21:43:46 GMT, jkeenan wrote:
> On Fri, 18 Nov 2016 19:18:07 GMT, ntyni@debian.org wrote:
> > This is a bug report for perl from Niko Tyni <ntyni@debian.org>,
> > generated with the help of perlbug 1.40 running under perl 5.25.7.
> >
> >
> > -----------------------------------------------------------------
> > [Please describe your issue here]
> >
> > The Configure test for long double implementation details probes the
> > contents of "long double inf", and they get stored in the Config
> > module:
> >
> > % perl -V:longdblinfbytes
> > longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
> > 0xff,
> > 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00';
> >
> > Some of these bytes are currently essentially random and vary between
> > builds on at least amd64 and i386, because their long doubles are
> > only
> > 80-bit and the remaining six bytes stay uninitialized.
> >
> > The relevant Configure probe tries to initialize these bytes, but has
> > several bugs that defeat the purpose. Patch attached.
> >
> > The randomness seems to only have started to show on Debian with GCC-
> > 6
> > for one reason or another; the bytes are zeroed out on at least GCC-
> > 5.
> >
> 
> Do you expect that the impact of this will only show up if someone is
> using 'gcc' rather than, say, g++ or clang?
> 
> I ask because I suspect we'll have to hunt up people to test this on
> multiple versions of multiple C compilers.
> 
> Thank you very much.


FWIW, here's the diff I got when applying your patch to blead using this 'gcc':

#####
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
#####
$ diff before.txt after.txt
1c1
< longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00';
---
> longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00';
#####

Is that what you would expect?

Thank you very much.

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

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=130133

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About