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

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

Thread Next
From:
bulk88 via RT
Date:
September 28, 2014 09:17
Subject:
[perl #122861] [PATCH] for storage of NVs, use "IV in sv_u in head no-body trick" where possible
Message ID:
rt-4.0.18-26500-1411895852-885.122861-15-0@perl.org
On Sat Sep 27 23:57:12 2014, sprout wrote:
> On Sat Sep 27 22:50:38 2014, bulk88 wrote:
> > This is a bug report for perl from bulk88@hotmail.com,
> > generated with the help of perlbug 1.40 running under perl 5.21.4.
> >
> >
> > -----------------------------------------------------------------
> > [Please describe your issue here]
> >
> > See attached patch.
> 
> sv.c:13252:16: warning: implicit declaration of function 'new_XNV'
>       [-Wimplicit-function-declaration]
>         SvANY(dstr)     = new_XNV();
> ...
> Undefined symbols for architecture x86_64:
>   "_new_XNV", referenced from:
>       _S_sv_dup_common in sv.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> 
> I think you need to update S_sv_dup_common as well.
> 
> On system (64-bit darwin) both IVSIZE and NVSIZE are 8.

new patch attached

Forgot to stage a hunk that was in my WD, since threaded is my normal build type and I would've caught it. If IVSIZE and NVSIZE are identical, then optimization happens, so congratulations for you. I changed the macros around new_XNV to guard exactly against this failure (someone using new_XNV without knowing NVs are now bodyless sometimes) and the error was caught.

-- 
bulk88 ~ bulk88 at hotmail.com

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

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