New submission from Jan Varho <[email protected]>: A change introduced in ad495c3 causes a MemoryError in code that worked fine in 1.9. The commit undoes an optimization for getslice ona list that uses RangeListStrategy. The rationale cited is an overflow, but the test added (test_range_getslice_ovf) actually passes with the optimized code from prior to the commit.
A simplistic example of code that regressed is something like: a = range(1, sys.maxint) # the natural numbers b = a[:N] # do something with the first N Reverting the getslice method of RangeListStrategy to the version prior to ad495c3 and changing test_range_getslice_ovf to assert that l2 is using RangeListStrategy seems to work fine. ---------- messages: 5971 nosy: otus, pypy-issue priority: bug release: 2.1 status: unread title: Regression: getting a small slice of a range list allocates the whole range list ________________________________________ PyPy bug tracker <[email protected]> <https://bugs.pypy.org/issue1554> ________________________________________ _______________________________________________ pypy-issue mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-issue
