[3.6] bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059) by miss-islington · Pull Request #9199 · python/cpython (original) (raw)

Address a C undefined behavior signed integer overflow issue in set object table resizing. Our -fwrapv compiler flag and practical reasons why sets are unlikely to get this large should mean this was never an issue but it was incorrect code that generates code analysis warnings.

https://bugs.python.org/issue1621

(cherry picked from commit 6c7d67c)

Co-authored-by: Sergey Fedoseev fedoseev.sergey@gmail.com