[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gmp-devel
Subject:    Undefined-behavior overflows in GMP?
From:       tg () gmplib ! org (Torbjorn Granlund)
Date:       2012-11-20 20:03:50
Message-ID: 86txskhwih.fsf () shell ! gmplib ! org
[Download RAW message or body]

Vincent Lefevre <vincent at vinc17.net> writes:

  Concerning the mul_i.h problem, it was fixed there, AFAIK:
  
  2012-02-09  Marc Glisse  <marc.glisse at inria.fr>
  
          * gmp-impl.h (ABS_CAST): New macro.
          * mpf/cmp_si.c: Use ABS_CAST.
          * mpf/get_si.c: Use ABS_CAST.
          * mpf/iset_si.c: Use ABS_CAST.
          * mpf/set_si.c: Use ABS_CAST.
          * mpq/set_si.c: Use ABS_CAST.
          * mpz/cmp_si.c: Use ABS_CAST.
          * mpz/get_si.c: Use ABS_CAST.
          * mpz/iset_si.c: Use ABS_CAST.
          * mpz/mul_i.h: Use ABS_CAST.
          * mpz/set_si.c: Use ABS_CAST.

I see, now I understand why I didn't find the purported problems: I
guessed the wrong directory (missing from the original report) and there
was an off-by-one error.

(Curiously enough, mpz/cmp_si.c does not use ABS_CAST.)

-- 
Torbj?rn

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic