[pypy-commit] pypy virtual-arguments: and another potentiall JIT crasher

fijal noreply at buildbot.pypy.org
Thu Jul 19 16:11:11 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56221:f489930abf23
Date: 2012-07-19 16:10 +0200
http://bitbucket.org/pypy/pypy/changeset/f489930abf23/

Log:	and another potentiall JIT crasher

diff --git a/pypy/module/cpyext/listobject.py b/pypy/module/cpyext/listobject.py
--- a/pypy/module/cpyext/listobject.py
+++ b/pypy/module/cpyext/listobject.py
@@ -19,6 +19,8 @@
     PySequence_SetItem()  or expose the object to Python code before
     setting all items to a real object with PyList_SetItem().
     """
+    if len < 0:
+        len = 0
     return space.newlist([None] * len)
 
 @cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT_real, error=-1)


More information about the pypy-commit mailing list