Bugs item #1759014, was opened at 2007-07-23 18:17 Message generated for change (Tracker Item Submitted) made by Item Submitter 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
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1759014...