[pypy-commit] pypy default: add one extra assert here

fijal noreply at buildbot.pypy.org
Thu Apr 11 23:48:38 CEST 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r63249:fa879c4fc72f
Date: 2013-04-11 23:47 +0200
http://bitbucket.org/pypy/pypy/changeset/fa879c4fc72f/

Log:	add one extra assert here

diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -952,6 +952,7 @@
     ll_assert(start <= l1.ll_length(), "l[start:x] = l with start > len(l)")
     ll_assert(count == stop - start,
                  "setslice cannot resize lists in RPython")
+    ll_assert(stop <= l1.ll_length(), "stop cannot be past the end of l1")
     # XXX ...but it would be easy enough to support if really needed
     ll_arraycopy(l2, l1, 0, start, count)
 ll_listsetslice.oopspec = 'list.setslice(l1, start, stop, l2)'


More information about the pypy-commit mailing list