[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Oh, I agree - I think we should update 3311 with the enhancement to move the check to connection_new ___ Python tracker ___ __

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: jnoller> issue #3311 Oh, I forgot this issue :-) But the fix doesn't solve #3311, because it is disabled on Windows and only protect poll() method. ___ Python tracker

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: That's an enhancement - not a bad idea, I just noticed that this issue is pretty close to issue http://bugs.python.org/issue3311 as well. ___ Python tracker _

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Why don't you check the file descriptor directly in connection_new()? conn->handle is read only and so can't be changed before the call to poll(). So other methods will also be "protected" and the error will be raised earlier. ___

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Ugh, I didn't mean to chuck your original patch, but it also wasn't correct for win32 Additionally, if you close the handle from underneath it, it behaves properly: >>> obj.poll() Traceback (most recent call last): File "", line 1, in IOError: [Errno 9] Bad

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: The save was needed for the Py_BLOCK_THREADS call. ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: @jnoller: Hey, you removed my patch! My patch used fstat() in Connection constructor, whereas your just check file descriptor bounds in the poll() method. And what is the "save" new argument? Is it related to this issue? _

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Committed patch as r68768 to python-trunk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file12795/issue_3321.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Removed raise TestSkip per code review from bpeterson Added file: http://bugs.python.org/file12797/issue_3321.patch ___ Python tracker ___ ___

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file12794/issue_3321.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Curse you hard-tabs. Here's the new patch w/ fixed comment Added file: http://bugs.python.org/file12795/issue_3321.patch ___ Python tracker ___ __

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file11485/another_solution.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file11007/test_multiprocessing.patch ___ Python tracker ___ ___ Python-bugs-list

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller : Removed file: http://bugs.python.org/file10861/_multiprocessing_connection.patch ___ Python tracker ___ ___ Python-bu

[issue3321] _multiprocessing.Connection() doesn't check handle

2009-01-19 Thread Jesse Noller
Jesse Noller added the comment: Attached is a patch+test for this condition, which is not used if we're running on windows. Added file: http://bugs.python.org/file12794/issue_3321.patch ___ Python tracker

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: I've implemented "another solution". test_open() in test_multithreading.patch won't pass though It'll raise error in conn.poll() not in constructor. $ ./dummy.exe b.py Traceback (most recent call last): File "b.py", line 6, in c

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: I thought socket handle on BeOS is not file descripter neighter. (I'm not sure BeOS is still supported or not) >Another solution would be to reuse code from Modules/selectmodule.c. You mean this code? if (v < 0 || v >= FD_SETSIZE) {

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Note that Windows does not crash in such cases: >>> import socket, _multiprocessing >>> obj = _multiprocessing.Connection(44977608) >>> obj.poll() IOError: [Errno 10038] An operation was attempted on something that is not a socket >>>

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-12 Thread Jesse Noller
Jesse Noller <[EMAIL PROTECTED]> added the comment: Without someone offering some windows help, I won't be able to do a patch. My windows fu is lacking. ___ Python tracker <[EMAIL PROTECTED]>

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-12 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- keywords: +needs review priority: high -> critical ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-09-12 Thread Daniel Diniz
Changes by Daniel Diniz <[EMAIL PROTECTED]>: -- nosy: +ajaksu2 ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing l

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I'm quite sure that neither the patch nor the new test make sense on Windows. A file handle is not a file descriptor! -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]>

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-30 Thread Jesse Noller
Jesse Noller <[EMAIL PROTECTED]> added the comment: >From Victor: Ok, here is a patch for test_multiprocessing.py. - TestClosedFile.test_open() verify that Connection() rejects closed file descriptor - TestClosedFile.test_operations() verify that Connection() raises IOError for operations on clo

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-19 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- priority: -> high ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list maili

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-15 Thread Jesse Noller
Changes by Jesse Noller <[EMAIL PROTECTED]>: -- nosy: +roudkerk ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-15 Thread Jesse Noller
Changes by Jesse Noller <[EMAIL PROTECTED]>: -- assignee: -> jnoller nosy: +jnoller ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Pyth

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-14 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10860/_multiprocessing_connection.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ooops, there is a typo in my last patch: it's "struct stat statbuf;" and not "struct stat *statbuf;"! Here is a new version of the patch. Added file: http://bugs.python.org/file10861/_multiprocessing_connection.patch ___

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- type: -> crash ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailin

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _multiprocessing.Connection() allows to use any positive (or nul) number has socket handle. If you use an invalid file descriptor, poll() method may crash (especially for big positive integer). Example: >>> import _multiprocessing >>> ob