range() with large step causes undefined behaviour
With positive step, range(start, stop, step) translates roughly like:
def range(start, stop, step):
cur = start
while cur < stop:
yield cur
cur += step
Signed integer overflow, which is undefined behaviour in C, may happen on the line cur += step
, e.g. if start + step > sys.maxint.
Note: this caused the issue fixed in be2a55c81f26