Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 8784b2b769532fbc1d66bf9a67f7b4f3673d29de
      
https://github.com/Perl/perl5/commit/8784b2b769532fbc1d66bf9a67f7b4f3673d29de
  Author: Lukas Mai <lukasmai....@gmail.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M t/op/pack.t

  Log Message:
  -----------
  op/pack.t: handle sizeof (IV) > sizeof (void *)

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.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to