develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122861] [PATCH] for storage of NVs, use "IV in sv_u inhead no-body trick" where possible

Thread Previous | Thread Next
From:
Steffen Mueller
Date:
September 28, 2014 12:39
Subject:
Re: [perl #122861] [PATCH] for storage of NVs, use "IV in sv_u inhead no-body trick" where possible
Message ID:
5428015C.4070208@cpan.org
On 09/28/2014 07:50 AM, bulk88 (via RT) wrote:
> # New Ticket Created by  bulk88
> # Please include the string:  [perl #122861]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org/Ticket/Display.html?id=122861 >

> See attached patch. I am surprised Nicholas didn't do this in the
> original "IV is now bodyless" patch, and nobody else thought of it for 9
> years. I had heap corruption (a bodyless NV had free() called on it) and
> in DEBUGGING failed an existing assert on 1st try of this patch but it
> was fixed.

Around that time, Nicholas and I spoke about squeezing NVs into the SV 
HEAD. But IIRC the reason not to do it was because on some systems 
sizeof(NV) > sizeof(IV) and the special casing of some systems wasn't 
deemed worth the small gain (NVs aren't that common in most Perl code).

--Steffen

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