• Pekka Pessi's avatar
    su_root.c: fixed race condition in su_task_execute(). · 72e36078
    Pekka Pessi authored
    Patch #1552626 by Andrzej Ciarkowski:
    
    While running test_nua example it crashes on
    su_task_execute() (called from test_nat_flush()). The
    function has race condition - call to
    pthread_cond_wait(frame->cond, frame->mutex); may
    happen when memory pointed by frame is already
    deallocated by the message dispatcher. This is clearly
    visible in VC++ Debug builds, as debug version of
    Windows allocator overwrites freed memory with some
    rubbish, so that mutex and cond both point into
    garbage. The frame probably should not be allocated as
    a part of the message.
    
    darcs-hash:20060905214600-65a35-4e95c3c1900e364e670fd4504ef54c847c425f4e.gz
    72e36078