[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Christian. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread Roundup Robot
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 USH

[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread STINNER Victor
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 ___ __

[issue17919] AIX POLLNVAL definition causes problems

2013-12-15 Thread Christian Heimes
Christian Heimes added the comment: I have fixed the issue in http://hg.python.org/cpython/rev/039306b45230 -- nosy: +christian.heimes ___ Python tracker ___

[issue17919] AIX POLLNVAL definition causes problems

2013-12-15 Thread Stefan Krah
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 te

[issue17919] AIX POLLNVAL definition causes problems

2013-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Delhallt for your report. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue17919] AIX POLLNVAL definition causes problems

2013-12-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17919] AIX POLLNVAL definition causes problems

2013-12-14 Thread Roundup Robot
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 inte

[issue17919] AIX POLLNVAL definition causes problems

2013-12-14 Thread Serhiy Storchaka
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 h

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor
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. -- _

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor
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 resul

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Serhiy Storchaka
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 ___

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor
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

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread STINNER Victor
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

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Roundup Robot
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 #17919:

[issue17919] AIX POLLNVAL definition causes problems

2013-12-13 Thread Serhiy Storchaka
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 _

[issue17919] AIX POLLNVAL definition causes problems

2013-11-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue17919] AIX POLLNVAL definition causes problems

2013-11-12 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs

[issue17919] AIX POLLNVAL definition causes problems

2013-11-12 Thread Michael Haubenwallner
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 poll_

[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread David Edelsohn
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. --

[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread Delhallt
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 "Over