Bug 998 - Deallocating Ipv4Endpoint sometimes causes TcpSocketImpl's own destructor to be called
Deallocating Ipv4Endpoint sometimes causes TcpSocketImpl's own destructor to ...
Status: VERIFIED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3.9
All All
: P5 normal
Assigned To: Adrian S.-W. Tam
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-17 16:33 EDT by Michele Weigle
Modified: 2011-12-10 21:49 EST (History)
1 user (show)

See Also:


Attachments
Modification to tcp-socket-impl.cc (778 bytes, text/plain)
2010-09-17 16:33 EDT, Michele Weigle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Weigle 2010-09-17 16:33:34 EDT
Created attachment 983 [details]
Modification to tcp-socket-impl.cc

Slightly modified the order in which things are destroyed/zeroed when TcpSocketImpl is fully closed. This was already a fairly gnarly piece of code with a 7-line comment block attached to it, so I'm a little less
sure of this one. Deallocating the Ipv4Endpoint would sometimes result in the TcpSocketImpl's own destructor being called due to Ptr reference counting; changing the order of events _here_ allowed this to happen without the destructor failing an assertion. Attached as tcp-socket-deallocate.diff
Comment 1 Tom Henderson 2011-08-09 14:40:52 EDT
need to confirm if this is still valid
Comment 2 Adrian S.-W. Tam 2011-12-10 21:49:24 EST
Fixed in TcpSocketBase