Commit 2630ac9b authored by Kevin Modzelewski's avatar Kevin Modzelewski

Try again to fix #272

parent 88cbdd00
......@@ -5,16 +5,10 @@ for k in sorted(dir(select)):
continue
if k == "EPOLLET":
# On 32-bit versions of CPython, select.EPOLLET (==1<<31) overflows a 32-bit signed integer
# and becomes INT_MIN. But really, it's a bitmask so it's an unsigned value and imho should
# be provided as a positive number.
# Since we only build Pyston in 64-bit mode, EPOLLET is always positive in Pyston. If we
# see that it's negative, just make sure that it probably hit this behavior (wrapped around)
v = select.EPOLLET
if v < 0:
import sys
assert (-v) > sys.maxint
print abs(v)
if v == (-1 << 31):
v = 1<<31
print v
else:
print k, getattr(select, k)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment