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

2009-01-19 Thread Jesse Noller
Jesse Noller jnol...@gmail.com 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 rep...@bugs.python.org

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file10861/_multiprocessing_connection.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file11007/test_multiprocessing.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file11485/another_solution.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread Jesse Noller
Jesse Noller jnol...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue3321

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file12794/issue_3321.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

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

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: Removed file: http://bugs.python.org/file12795/issue_3321.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Committed patch as r68768 to python-trunk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___ ___

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

2009-01-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 jnol...@gmail.com added the comment: The save was needed for the Py_BLOCK_THREADS call. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread Jesse Noller
Jesse Noller jnol...@gmail.com 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 stdin, line 1, in

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

2009-01-19 Thread Jesse Noller
Changes by Jesse Noller jnol...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321 ___

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

2009-01-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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
Jesse Noller jnol...@gmail.com 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 rep...@bugs.python.org

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

2009-01-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rep...@bugs.python.org

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

2009-01-19 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Oh, I agree - I think we should update 3311 with the enhancement to move the check to connection_new ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3321

[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 s =

[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 Hirokazu Yamamoto
Changes by Hirokazu Yamamoto [EMAIL PROTECTED]: -- keywords: +needs review ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list

[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 module

[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] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list

[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] http://bugs.python.org/issue3321 ___

[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] http://bugs.python.org/issue3321

[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

[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-19 Thread Georg Brandl
Changes by Georg Brandl [EMAIL PROTECTED]: -- priority: - high ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3321 ___ ___ 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] http://bugs.python.org/issue3321 ___ ___

[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] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list

[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] http://bugs.python.org/issue3321 ___

[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 obj =

[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] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list

[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