[pypy-svn] r17310 - pypy/dist/pypy/rpython

tismer at codespeak.net tismer at codespeak.net
Wed Sep 7 02:24:48 CEST 2005


Author: tismer
Date: Wed Sep  7 02:24:47 2005
New Revision: 17310

Modified:
   pypy/dist/pypy/rpython/rlist.py
Log:
bug in ll_mul,assigning sourcetoo early.
_ll_list_resize might change the list items
and nullify the old list we use as source.

Unfortunately, no test seems to uncover this problem.
using py.py and the other tests, everything appears
to be fine. Probably the isinstance enquiries do
not work properly if we are not compiling?
Well, using py.py, rlist isn't even used at all.

But I'm wondering what all the tests are good for
if such things can only be found by compiling?
I thought llinterp would behave almost like compiled code?


Modified: pypy/dist/pypy/rpython/rlist.py
==============================================================================
--- pypy/dist/pypy/rpython/rlist.py	(original)
+++ pypy/dist/pypy/rpython/rlist.py	Wed Sep  7 02:24:47 2005
@@ -728,7 +728,6 @@
 TEMP = GcArray(Ptr(rstr.STR))
 
 def ll_mul(func, l, factor):
-    source = l.items
     length = l.length
     if factor < 0:
         factor = 0
@@ -741,6 +740,7 @@
         res = ll_newlist(typeOf(l), resultlen)
         j = 0
     i = 0
+    source = l.items
     target = res.items
     while j < resultlen:
         while i < length:



More information about the Pypy-commit mailing list