Message1671

Author cgroves
Recipients
Date 2007-10-14.20:46:49
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
It looks like it'd be possible to get a socket object that's been closed in _socketobject.__init__ if multiple threads are dealing with the same socket.  If one thread closes the socket after another thread calls accept but before that thread calls __init__,  the reference_count won't be incremented until after it's been closed.  

I think making all the reference_count operations happen in a synchronized block before the actual reference is given out should fix this.  From what I can see, that would be incrementing the reference_count when the socket is acquired through accept and duplicated in dup, and then decrementing it in close.
History
Date User Action Args
2008-02-20 17:17:52adminlinkissue1744567 messages
2008-02-20 17:17:52admincreate