Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: b9b8c7d2e8567b5c6652a643b4a44af22e06f2bc
      
https://github.com/Perl/perl5/commit/b9b8c7d2e8567b5c6652a643b4a44af22e06f2bc
  Author: TAKAI Kousuke <62541129+t-...@users.noreply.github.com>
  Date:   2024-04-13 (Sat, 13 Apr 2024)

  Changed paths:
    M handy.h
    M pp.c
    M t/op/64bitint.t
    M t/opbasic/arith.t

  Log Message:
  -----------
  Fixed a bug that % operator returns wrong result when modulo is (IV_MIN - 1)

If $m % $n would generate a result that shall be equal to (IV_MIN - 1),
pp_modulo() used to wrongly convert it into IV and return wrapped
(overflowed) result.

handy.h: Added utility macros for this fix.  I think these macro can
be used in other places, so I put them on .h file.

t/opbasic/arith.t, t/op/64bitint.t: Added tests for this.



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

Reply via email to