[pypy-commit] lang-smalltalk 64bit-c2: Float asString produced wrong results because image instances were read wrongly

Hubert Hesse noreply at buildbot.pypy.org
Wed Jul 2 17:52:50 CEST 2014


Author: Hubert Hesse <hubert.hesse at student.hpi.uni-potsdam.de>
Branch: 64bit-c2
Changeset: r847:54b5ca0cfbd4
Date: 2014-06-12 20:14 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/54b5ca0cfbd4/

Log:	Float asString produced wrong results because image instances were
	read wrongly

diff --git a/spyvm/squeakimage.py b/spyvm/squeakimage.py
--- a/spyvm/squeakimage.py
+++ b/spyvm/squeakimage.py
@@ -561,8 +561,9 @@
         return bytes[:stop] # omit odd bytes
 
     def get_ruints(self, required_len=-1):
-        from rpython.rlib.rarithmetic import r_uint
-        words = [r_uint(x) for x in self.chunk.data]
+        from rpython.rlib.rarithmetic import r_uint32
+        # XXX: Fix for 64bit image support
+        words = [r_uint32(x) for x in self.chunk.data]
         if required_len != -1 and len(words) != required_len:
             raise CorruptImageError("Expected %d words, got %d" % (required_len, len(words)))
         return words


More information about the pypy-commit mailing list