[pypy-commit] pypy gc_no_cleanup_nursery: Translated, lldebug builds occasionally crash on 32-bit when seeing

arigo noreply at buildbot.pypy.org
Sun Sep 28 18:16:55 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: gc_no_cleanup_nursery
Changeset: r73736:e1ccb206cbe8
Date: 2014-09-28 18:16 +0200
http://bitbucket.org/pypy/pypy/changeset/e1ccb206cbe8/

Log:	Translated, lldebug builds occasionally crash on 32-bit when seeing
	the ">> 32". This is not an issue in this particular case, but fix
	it anyway.

diff --git a/rpython/jit/metainterp/optimizeopt/intbounds.py b/rpython/jit/metainterp/optimizeopt/intbounds.py
--- a/rpython/jit/metainterp/optimizeopt/intbounds.py
+++ b/rpython/jit/metainterp/optimizeopt/intbounds.py
@@ -24,6 +24,8 @@
         return (1 << ((byte_size << 3) - 1)) - 1
 
 
+IS_64_BIT = sys.maxint > 2**32
+
 def next_pow2_m1(n):
     """Calculate next power of 2 greater than n minus one."""
     n |= n >> 1
@@ -31,7 +33,8 @@
     n |= n >> 4
     n |= n >> 8
     n |= n >> 16
-    n |= n >> 32
+    if IS_64_BIT:
+        n |= n >> 32
     return n
 
 


More information about the pypy-commit mailing list