Menu

#33 fix crash in pcap thread

closed
nobody
sipp (50)
5
2010-06-16
2008-02-03
Kenneth Cox
No

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.

Discussion

  • Kenneth Cox

    Kenneth Cox - 2008-02-03

    thread crash patch

     
  • Olivier Boulkroune

    Logged In: YES
    user_id=1475960
    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

     

Log in to post a comment.