#33 fix crash in pcap thread

sipp (50)
Kenneth Cox

Sipp 3 and 2 occassionally crash dereferencing a play_args_t structure that has been freed by the control thread aborting the call. There is not currently any signalling used to tear down the pcap thread when the call aborts, and so the play_args_t is freed out from under the running thread.

This patch avoids the crash by changing the play_args_t struct inside the call class to a pointer allocated by malloc(). If the thread is successfully started, then the thread routine (send_wrapper()) is responsible for freeing the play_args_t. If the thread is not successfully started, then the freeing is done by the caller.

Problem verified, and fix validated with valgrind on Linux.


  • Olivier Boulkroune

    Logged In: YES
    Originator: NO

    to be reviewed

  • Kenneth Cox

    Kenneth Cox - 2010-06-16
    • status: open --> closed
  • Kenneth Cox

    Kenneth Cox - 2010-06-16

    This patch was superceded by 2796260


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks