Bugs item #1759014, was opened at 2007-07-23 09:17 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1759014...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: externals Group: None Status: Open Resolution: None Priority: 7 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Martin Peach (mrpeach) Summary: random tcpserver crashes
Initial Comment: tcpserver easily crashes, when deleting one of several [tcpserver] objects.
i was only able to reproduce this reliably on x86_64 platform by the following way (sounds a bit more complicated than it needs to be): 1. create [tcpserver 5600] (ok) 2. create [tcpserver 5800] (ok) 3. create [tcpserver 0] (ok) 4. create [tcpserver 0] (ok) 5. rename (3) to [tcpserver 5600] (the object will fail to create) 6. rename (4) to [tcpserver 5800] (pd will crash)
i had no problem with the same procedure on i686.
nevertheless, after a look at the code i wonder why it doesn't crash more often... tcpserver uses a static binbuf, which is destroyed without checks in the free method. since the binbuf is static, the next tcpserver that is destroyed will try to free the binbuf again, leading to a segfault.
the good news is, that the binbuf is really nowhere needed in the code (it only gets created and deleted).
the attached patch removes it, leading to a no more crashes on x86_84
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody) Date: 2007-07-23 09:49
Message: Logged In: NO
OK, it's fixed. Thanks for finding it!
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1759014...