Issue 79056

Summary: vos: OAcceptorSocket dtor and base dtor both attempt to delete the socket
Product: udk Reporter: caolanm
Component: codeAssignee: hennes.rohling
Status: CLOSED FIXED QA Contact: issues@udk <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.2.1   
Target Milestone: OOo 2.3   
Hardware: All   
OS: All   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
patch to avoid none

Description caolanm 2007-07-01 17:35:21 UTC
So it looks to me that if you destruct vos: OAcceptorSocket it will delete the
socket, and then OSocket's dtor will then be called which also attempt to
reference the deleted socket to close it.

How about this minimal patch
Comment 1 caolanm 2007-07-01 17:35:41 UTC
Created attachment 46409 [details]
patch to avoid
Comment 2 kay.ramme 2007-07-02 12:04:29 UTC
->Caolan: Couldn't we just move the "osl_closeSocket" call to "OSocket::close"
and completely remove "OAcceptorSocket::~OAcceptorSocket" ? Anyway, reassigned
to Hennes ...
Comment 3 kay.ramme 2007-07-04 14:34:08 UTC
.
Comment 4 hennes.rohling 2007-07-11 12:54:29 UTC
Simple enough to make it into 2.3 ;-)
Comment 5 hennes.rohling 2007-07-11 13:40:48 UTC
Removing ~OAcceptorSocket would make the change incompatible.

Furthermore: close() is a virtual method of OAcceptorSocket and calling close()
from base dtor will call OScoket::close() but not OAcceptorSocket::close().

Taking Caolans patch.
Comment 6 hennes.rohling 2007-07-11 13:48:35 UTC
Fixed on CWS hropatches
Comment 7 hennes.rohling 2007-08-01 10:24:46 UTC
Verfied the patch.
Comment 8 caolanm 2007-08-27 10:55:51 UTC
closed