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

64-bit array subscript warning test failing

Thread Next
From:
Dave Mitchell
Date:
July 17, 2016 20:22
Subject:
64-bit array subscript warning test failing
Message ID:
20160717202212.GG3477@iabyn.com
Since this commit:

    commit 1b3df0e6584ada095ded632e22ae5b3a3f9b802d
    Author:     Father Chrysostomos <sprout@cpan.org>
    AuthorDate: Thu Jun 23 13:32:28 2016 -0700

    Preserve 64-bit array offsets in uninit warnings

t/lib/warnings/9uninit has been failing on 32-bit systems with -Duse64bitint
(i.e. 32-pointers and SSize_t, 64-bit IV).

The failure can be reduced to:

    perl -we '"$a[140688675223280]"'

which on 64-bit systems gives:

    Use of uninitialized value $a[140688675223280] in string at -e line 1.

while on 32+64 bit systems it gives:

    Use of uninitialized value $a[-1568491792] in string at -e line 1.

due to an IV passed as an arg to Perl_varname() which expects SSize_t.

The quick and dirty fix would be to just skip the test on platforms where
sizeof(SSize_t) < sizeof(IV).

-- 
Monto Blanco... scorchio!

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