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

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

Thread Previous
From:
Tony Cook
Date:
November 18, 2016 22:52
Subject:
Re: [perl #130133] [PATCH] Configure leaves garbage in$Config{longdblinfbytes}
Message ID:
20161118225208.GI5644@mars.tony.develop-help.com
On Fri, Nov 18, 2016 at 10:23:10PM +0000, Pip Cet wrote:
> Instead of memsetting after the fact, we could clear an area of memory
> before storing the (long) doubles there, that would catch any future
> formats with undefined bytes, too.

That isn't reliable.

While we might hope that the compiler generates code that stores
directly from the FPU into our pristine buffer, depending on the
compiler and optimization level it may end up making extra copies,
including random rubbish from other buffers.

See:

https://rt.perl.org/Ticket/Display.html?id=123971

for a case where this bit us.

Tony

Thread Previous


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