[pypy-commit] pypy stmgc-c8: probably missing memclear after allocation of nonmovable obj

Raemi noreply at buildbot.pypy.org
Fri Mar 13 16:28:31 CET 2015


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: stmgc-c8
Changeset: r76364:f30c3fd32ba8
Date: 2015-03-13 14:41 +0100
http://bitbucket.org/pypy/pypy/changeset/f30c3fd32ba8/

Log:	probably missing memclear after allocation of nonmovable obj

diff --git a/rpython/translator/stm/funcgen.py b/rpython/translator/stm/funcgen.py
--- a/rpython/translator/stm/funcgen.py
+++ b/rpython/translator/stm/funcgen.py
@@ -123,7 +123,9 @@
     result      = funcgen.expr(op.result)
     # XXX NULL returns?
     return ('%s = (rpygcchar_t *)_stm_allocate_external(%s >= 16 ? %s : 16); ' %
-                (result, arg_size, arg_size) +
+            (result, arg_size, arg_size) +
+            'pypy_stm_memclearinit((object_t*)%s, 0, %s >= 16 ? %s : 16);' %
+            (result, arg_size, arg_size) +
             '((rpyobj_t *)%s)->tid = %s;' % (result, arg_type_id))
 
 def stm_set_into_obj(funcgen, op):


More information about the pypy-commit mailing list