This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quad_t and Uquad_t cannot unpack as NVs.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 6 May 2014 16:50:55 +0000 (12:50 -0400)
committerTony Cook <tony@develop-help.com>
Thu, 29 May 2014 06:50:54 +0000 (16:50 +1000)
commitc174bf3bd0aaba83d7aba81b0fbcb0055109a168
tree6fba75fe6f73d7fcd9d6a7f5b87cb423dde3449c
parent00b25eff1415ab27d5829f30fea1fecd57a7934e
Quad_t and Uquad_t cannot unpack as NVs.

If IVSIZE >= 8, a Quad_t is always >= IV_MIN, and <= IV_MAX, and an
Uquad_t is always (>= 0 aka UV_MIN and) <= UV_MAX; they cannot escape
their quadness and be NVs.  (This logic may fail if Quad_t is not 8
bytes, but then other things would no doubt fail.)

Also tighten the logic by adding HAS_QUAD, also for the pack case.

Fix for Coverity perl5 CID 28942.
pp_pack.c