Stefan Krah <ste...@bytereef.org> added the comment: > We see if digits * bits_per_char + PyLong_SHIFT -1 overflows an int?
Yes, but the check is too late: UB can already occur in this calculation and then all bets are off. It looks like 'n' was Py_ssize_t in 2.7. :) ---------- nosy: +skrah _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31619> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com