This test tries to get the integer representation of a pointer via unpack 'j', pack 'P'. But an IV is not necessarily the same size as a pointer. In particular, on 32-bit platforms with -Duse64bitint we have sizeof (IV) == 8 and sizeof (void *) == 4, which makes unpack 'j' fail (the input string is too short) and return undef.
Work around the issue by checking for the most common pointer sizes (4 and 8 bytes) and selecting an appropriate integer unpack format. In all other cases (exotic platforms?), just skip the test.
Fixes #22618 – hopefully.
[ ] This set of changes requires a perldelta entry, and it is included.
[ ] This set of changes requires a perldelta entry, and I need help writing it.
[x] This set of changes does not require a perldelta entry.
This test tries to get the integer representation of a pointer via unpack 'j', pack 'P'. But an IV is not necessarily the same size as a pointer. In particular, on 32-bit platforms with -Duse64bitint we have sizeof (IV) == 8 and sizeof (void *) == 4, which makes unpack 'j' fail (the input string is too short) and return undef.
Work around the issue by checking for the most common pointer sizes (4 and 8 bytes) and selecting an appropriate integer unpack format. In all other cases (exotic platforms?), just skip the test.
Fixes #22618 – hopefully.