Author: Maciej Fijalkowski <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to