[pypy-commit] pypy release-1.6.x: Baaaah. Missing keepalive_until_here.

arigo noreply at buildbot.pypy.org
Sat Aug 13 19:06:15 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: release-1.6.x
Changeset: r46479:e79d6ab8a933
Date: 2011-08-13 17:55 +0200
http://bitbucket.org/pypy/pypy/changeset/e79d6ab8a933/

Log:	Baaaah. Missing keepalive_until_here.

diff --git a/pypy/rpython/lltypesystem/rstr.py b/pypy/rpython/lltypesystem/rstr.py
--- a/pypy/rpython/lltypesystem/rstr.py
+++ b/pypy/rpython/lltypesystem/rstr.py
@@ -3,6 +3,7 @@
 from pypy.rpython.error import TyperError
 from pypy.rlib.objectmodel import malloc_zero_filled, we_are_translated
 from pypy.rlib.objectmodel import _hash_string, enforceargs
+from pypy.rlib.objectmodel import keepalive_until_here
 from pypy.rlib.debug import ll_assert
 from pypy.rlib.jit import elidable, we_are_jitted, dont_look_inside
 from pypy.rlib.rarithmetic import ovfcheck
@@ -67,6 +68,8 @@
         src = llmemory.cast_ptr_to_adr(src) + _str_ofs(srcstart)
         dst = llmemory.cast_ptr_to_adr(dst) + _str_ofs(dststart)
         llmemory.raw_memcopy(src, dst, llmemory.sizeof(CHAR_TP) * length)
+        keepalive_until_here(src)
+        keepalive_until_here(dst)
     copy_string_contents._always_inline_ = True
     #copy_string_contents.oopspec = (
     #    '%s.copy_contents(src, dst, srcstart, dststart, length)' % name)


More information about the pypy-commit mailing list