Bug #
1346533, select.poll() doesn't raise an error if timeout > sys.maxint
Need to check return result of PyInt_AsLong()
Poll test 1 complete
Running poll test 2
Poll test 2 complete
+Running poll test 3
+Poll test 3 complete
p.close()
print 'Poll test 2 complete'
+def test_poll3():
+ # test int overflow
+ print 'Running poll test 3'
+ pollster = select.poll()
+ pollster.register(1)
+
+ try:
+ pollster.poll(1L << 64)
+ except OverflowError:
+ pass
+ else:
+ print 'Expected OverflowError with excessive timeout'
+
+ x = 2 + 3
+ if x != 5:
+ print 'Overflow must have occurred'
+ print 'Poll test 3 complete'
+
+
test_poll1()
test_poll2()
+test_poll3()
Extension Modules
-----------------
+- Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint
+
- Fix memory leak in posix.access().
- Patch #1213831: Fix typo in unicodedata._getcode.
return NULL;
timeout = PyInt_AsLong(tout);
Py_DECREF(tout);
+ if (timeout == -1 && PyErr_Occurred())
+ return NULL;
}
/* Ensure the ufd array is up to date */