[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

Alexey Izbyshev report at bugs.python.org
Sun Oct 28 17:50:11 EDT 2018


Alexey Izbyshev <izbyshev at ispras.ru> added the comment:

> This doesn't actually matter - the code can never trigger.

Yes, I considered this, and wondered why assert wasn't used in the first place, but the explicit check with a comment suggested that possibility of overflow was deemed real.

I've submitted a third PR that simply removes the checks and adds asserts instead.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35091>
_______________________________________


More information about the Python-bugs-list mailing list