Undefined-behavior overflows in GMP?

2012-11-20 Thread Roberto Bagnara
I have just finished reading Understanding Integer Overflow in C/C++, by Will Dietz, Peng Li, John Regehr, and Vikram Adve (http://www.cs.utah.edu/~regehr/papers/overflow12.pdf). On page 9, it says: Finally, we reported nine undefined overflows in the GNU Multiple Precision Arithmetic

Re: Undefined-behavior overflows in GMP?

2012-11-20 Thread Torbjorn Granlund
Roberto Bagnara bagn...@cs.unipr.it writes: I have just finished reading Understanding Integer Overflow in C/C++, by Will Dietz, Peng Li, John Regehr, and Vikram Adve (http://www.cs.utah.edu/~regehr/papers/overflow12.pdf). On page 9, it says: Finally, we reported nine undefined

Re: Undefined-behavior overflows in GMP?

2012-11-20 Thread Marc Glisse
On Tue, 20 Nov 2012, Roberto Bagnara wrote: I have just finished reading Understanding Integer Overflow in C/C++, by Will Dietz, Peng Li, John Regehr, and Vikram Adve (http://www.cs.utah.edu/~regehr/papers/overflow12.pdf). On page 9, it says: Finally, we reported nine undefined overflows in

Re: Undefined-behavior overflows in GMP?

2012-11-20 Thread Torbjorn Granlund
Marc Glisse marc.gli...@inria.fr writes: On Tue, 20 Nov 2012, Roberto Bagnara wrote: I have just finished reading Understanding Integer Overflow in C/C++, by Will Dietz, Peng Li, John Regehr, and Vikram Adve (http://www.cs.utah.edu/~regehr/papers/overflow12.pdf). On page 9, it

Re: Undefined-behavior overflows in GMP?

2012-11-20 Thread Torbjorn Granlund
Vincent Lefevre vinc...@vinc17.net writes: Concerning the mul_i.h problem, it was fixed there, AFAIK: 2012-02-09 Marc Glisse marc.gli...@inria.fr * gmp-impl.h (ABS_CAST): New macro. * mpf/cmp_si.c: Use ABS_CAST. * mpf/get_si.c: Use ABS_CAST. *