[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-09-10 Thread STINNER Victor
STINNER Victor added the comment: Implementation for any compiler using the new builtin if available: http://thread.gmane.org/gmane.linux.kernel/204 -- ___ Python tracker

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-09-10 Thread STINNER Victor
STINNER Victor added the comment: Implementation for any compiler using the new builtin if available: http://thread.gmane.org/gmane.linux.kernel/204 -- ___ Python tracker

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-05-25 Thread STINNER Victor
STINNER Victor added the comment: I'm no more interested to work on this issue, so I just close it. It was more a reminder for myself than a real issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
New submission from STINNER Victor: In CPython, almost all memory allocations are protected against integer overflow with code looking like that: if (length ((PY_SSIZE_T_MAX - struct_size) / char_size - 1)) { PyErr_NoMemory(); return NULL; } new_size = (struct_size

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Interpreter Core nosy: +serhiy.storchaka type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23270 ___