-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-1621: Avoid signed integer overflow in set_table_resize(). #9059
Conversation
@sir-sigurd: Status check is done, and it's a success ✅ . |
Thanks @sir-sigurd for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
…nGH-9059) 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. <!-- issue-number: [bpo-1621](https://www.bugs.python.org/issue1621) --> https://bugs.python.org/issue1621 <!-- /issue-number --> (cherry picked from commit 6c7d67c) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
GH-9198 is a backport of this pull request to the 3.7 branch. |
GH-9199 is a backport of this pull request to the 3.6 branch. |
…nGH-9059) 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. <!-- issue-number: [bpo-1621](https://www.bugs.python.org/issue1621) --> https://bugs.python.org/issue1621 <!-- /issue-number --> (cherry picked from commit 6c7d67c) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
In person conversation with @rhettinger here: this change appears correct. size_t newsize matches the type actually expected by the PyMem_MALLOC() call using it below. |
…) (GH-9199) 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. (cherry picked from commit 6c7d67c) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
… (GH-9198) 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. Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
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