STINNER Victor added the comment:
I have fixed the issue in http://hg.python.org/cpython/rev/039306b45230
You forget 2.7 and 3.3 branches.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
Roundup Robot added the comment:
New changeset c42647d76bd1 by Christian Heimes in branch '3.3':
Issue #17919: add missing import of USHRT_MAX
http://hg.python.org/cpython/rev/c42647d76bd1
New changeset 1f3f4147c35e by Christian Heimes in branch 'default':
Issue #17919: add missing import of
Serhiy Storchaka added the comment:
Thank you Christian.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
___
Python-bugs-list mailing
Stefan Krah added the comment:
Hi, this happens on the OpenIndiana bot:
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.3/builds/1259/steps/test/logs/stdio
test_devpoll1 (test.test_devpoll.DevPollTests) ... ok
test_events_mask_overflow (test.test_devpoll.DevPollTests) ... ERROR
Christian Heimes added the comment:
I have fixed the issue in http://hg.python.org/cpython/rev/039306b45230
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
Serhiy Storchaka added the comment:
The message should be C unsigned short.
Thanks.
The unit tests don't check that USHRT_MAX value is accepted.
And shouldn't. Not all values make sense. Meaning of USHRT_MAX is platform
depended.
With poll_events_mask_overflow.patch, the following hack
Roundup Robot added the comment:
New changeset 9bee6cc30db7 by Serhiy Storchaka in branch '2.7':
Issue #17919: Fixed integer overflow in the eventmask parameter.
http://hg.python.org/cpython/rev/9bee6cc30db7
New changeset 87bbe810e4e7 by Serhiy Storchaka in branch '3.3':
Issue #17919: Fixed
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
Serhiy Storchaka added the comment:
Thank you Delhallt for your report.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
___
Serhiy Storchaka added the comment:
The disadvantage of 'H' is that it never raises OverflowError.
The simplest solution is just revert a part of the patch for issue15989.
--
assignee: - serhiy.storchaka
versions: -Python 3.2, Python 3.3, Python 3.5
Roundup Robot added the comment:
New changeset 08c95dd68cfc by Serhiy Storchaka in branch '3.3':
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
http://hg.python.org/cpython/rev/08c95dd68cfc
New changeset e78743e03c8f by Serhiy Storchaka in branch 'default':
Issue
STINNER Victor added the comment:
The disadvantage of 'H' is that it never raises OverflowError.
The correct fix is to write a new parser just for this function.
See for example uint_converter() in Modules/zlibmodule.c. I would prefer to add
such new parser to Python/getargs.c directly, but
STINNER Victor added the comment:
The simplest solution is just revert a part of the patch for issue15989.
The revert reintroduced the integer overflow:
self-ufds[i].events = (short)PyLong_AsLong(value);
--
___
Python tracker
Serhiy Storchaka added the comment:
Here is a patch which uses special converter.
--
versions: +Python 3.3
Added file: http://bugs.python.org/file33120/poll_events_mask_overflow.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
With poll_events_mask_overflow.patch, the following hack can maybe be removed?
/* The 0x is a workaround for AIX. 'revents'
is a 16-bit short, and IBM assigned POLLNVAL
to be 0x8000, so the conversion to int
STINNER Victor added the comment:
+if (uval USHRT_MAX) {
+PyErr_SetString(PyExc_OverflowError,
+Python int too large for C unsigned int);
The message should be C unsigned short.
The unit tests don't check that USHRT_MAX value is accepted.
--
Michael Haubenwallner added the comment:
This is a regression since 2.7.4 because of http://bugs.python.org/issue15989.
As the 'events' and 'revents' members of 'struct pollfd' both are bitfields,
the question actually is why they need to be signed at all.
Additionally: I'm wondering why
Changes by Michael Haubenwallner michael.haubenwall...@salomon.at:
--
versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
___
New submission from Delhallt:
I encounted exactly the same issue http://bugs.python.org/issue923315 with
test_asyncore, test_asynchat and test_poll.
On AIX6.1, POLLNVAL=0x8000=SHRT_MIN=SHRT_MAX+1 (on 2 bytes) and parsing events
with PyArg_ParseTuple as a signed short 'h' do not work, i.e
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +David.Edelsohn
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17919
___
___
Python-bugs-list
David Edelsohn added the comment:
That's the way AIX allocated the bits. It's nice to check for overflow, but I
think the test is imposing more semantics on the mask bits than POSIX requires.
It just happens that the GLibc allocation of bits works out okay.
--
22 matches
Mail list logo