[pypy-commit] pypy default: fix when malloc() returns an address with the last bit set (arigato)

mattip pypy.commits at gmail.com
Sun Feb 24 13:28:51 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r96149:0bfaff4207c3
Date: 2019-02-24 20:25 +0200
http://bitbucket.org/pypy/pypy/changeset/0bfaff4207c3/

Log:	fix when malloc() returns an address with the last bit set (arigato)

diff --git a/rpython/rtyper/lltypesystem/llarena.py b/rpython/rtyper/lltypesystem/llarena.py
--- a/rpython/rtyper/lltypesystem/llarena.py
+++ b/rpython/rtyper/lltypesystem/llarena.py
@@ -252,7 +252,7 @@
 
     def _cast_to_int(self, symbolic=False):
         assert not symbolic
-        return self.arena._getid() + self.offset
+        return rffi.cast(lltype.Signed, self.arena._getid() + self.offset)
 
 
 def getfakearenaaddress(addr):


More information about the pypy-commit mailing list