[pypy-svn] r29711 - pypy/dist/pypy/rpython/memory

ludal at codespeak.net ludal at codespeak.net
Thu Jul 6 20:27:29 CEST 2006


Author: ludal
Date: Thu Jul  6 20:27:26 2006
New Revision: 29711

Modified:
   pypy/dist/pypy/rpython/memory/gc.py
Log:
(auc,ale,arigo,ludal)
fix gc (one of) cloning bug


Modified: pypy/dist/pypy/rpython/memory/gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc.py	(original)
+++ pypy/dist/pypy/rpython/memory/gc.py	Thu Jul  6 20:27:26 2006
@@ -546,11 +546,11 @@
                 if self.is_varsize(typeid):
                     itemsize = self.varsize_item_sizes(typeid)
                     offset_to_length = self.varsize_offset_to_length(typeid)
-                    length = (oldobj_addr +
-                              self.varsize_offset_to_length(typeid)).signed[0]
+                    length = (oldobj_addr + offset_to_length).signed[0]
                     newobj = self.malloc_varsize(typeid, length, size,
                                                  itemsize, offset_to_length,
                                                  False)
+                    size += length*itemsize
                 else:
                     newobj = self.malloc_fixedsize(typeid, size, False)
                     length = -1



More information about the Pypy-commit mailing list