homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix for #876637 - Random stack corruption from socketmodule
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: out of date
Dependencies: 876637 Superseder:
Assigned To: Nosy List: ajaksu2, loewis, nnorwitz, troels, vila
Priority: normal Keywords: patch

Created on 2004年06月10日 11:13 by troels, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketmodule_timeout_using_poll.patch troels, 2004年06月10日 11:13
Messages (5)
msg46164 - (view) Author: Troels Walsted Hansen (troels) Date: 2004年06月10日 11:13
Here's a patch to convert socketmodule to use poll()
for the timeout handling.
ifdefs and includes have been copied from selectmodule,
so I believe they should be correct for all platforms.
Compiled and tested on Linux (RH73).
msg46165 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004年08月22日 16:30
Logged In: YES 
user_id=21627
While the patch is good as it stands, it is also incomplete:
If poll(2) is not available, it might still overrun the
FD_SETSIZE. I think there should be another return value
from internal_select (-1), indicating an internal error. A
Python RuntimeError should be set in this case. Callers
should check for -1, and return immediately.
Are you willing to extend the patch in that direction?
msg46166 - (view) Author: Troels Walsted Hansen (troels) Date: 2004年08月26日 07:07
Logged In: YES 
user_id=32863
You're right, however I think that it is a very minor
problem compared to the current situation. All major UNIX
platforms support poll(2) in my experience. The only
important Python platform without poll is Windows, and it
doesn't have the FD_SETSIZE problem.
Thus I think the patch should be applied as it stands, but
the original bug ticket can be left open for another
enterprising individual to make the changes you suggest.
I'm afraid that work commitments prevent me from being that
individual for the foreseeable future...
msg46167 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006年02月07日 07:18
Logged In: YES 
user_id=33168
A fix for the bug (sd over FD_SETSIZE) has been checked in.
 Note select is called in Modules/_ssl.c too.
msg82055 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009年02月14日 13:57
Fixed in revision 42253.
History
Date User Action Args
2022年04月11日 14:56:04adminsetgithub: 40377
2009年02月14日 13:57:08ajaksu2setstatus: open -> closed
nosy: + ajaksu2
messages: + msg82055
dependencies: + Random stack corruption from socketmodule.c
type: behavior
resolution: out of date
stage: resolved
2008年01月05日 14:11:19vilasetnosy: + vila
2004年06月10日 11:13:59troelscreate

AltStyle によって変換されたページ (->オリジナル) /