Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2043 closed defect (fixed)

Fixed crash on pjnath-test due to access to an invalid callback — at Version 2

Reported by: riza Owned by: bennylp
Priority: normal Milestone: release-2.7
Component: pjnath Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by riza)

When executing pjnath-test (windows), crash happen when on concur_test() : "ice test a: immediate destroy".

Stacktrace:

pjnath-test-i386-Win32-vc14-Debug.exe!on_ice_complete(pj_ice_sess *ice, int status) Line 1642      C
pjnath-test-i386-Win32-vc14-Debug.exe!on_timer(pj_timer_heap_t * th, pj_timer_entry * te) Line 1175  C
pjnath-test-i386-Win32-vc14-Debug.exe!pj_timer_heap_poll(pj_timer_heap_t* ht, pj_time_val * next_delay) Line 643        C
pjnath-test-i386-Win32-vc14-Debug.exe!worker_thread_proc(void * p) Line 148        C
pjnath-test-i386-Win32-vc14-Debug.exe!thread_main(void * param) Line 464     C

Calling:

(*ice_st->cb.on_ice_complete)(ice_st, PJ_ICE_STRANS_OP_NEGOTIATION, status);

The callback and user_data was reset from this line:

    /* Reset callback and user data */
    pj_bzero(&ice_st->cb, sizeof(ice_st->cb));
    ice_st->user_data = NULL;

To avoid the crash due to the reset, then the callback is stored in a var
and use that to call the callback.

Change History (2)

comment:1 Changed 7 years ago by riza

  • Resolution set to fixed
  • Status changed from new to closed

In 5655:

Close #2043: Fixed pjnath-test crash due to access to an invalid callback.

comment:2 Changed 7 years ago by riza

  • Description modified (diff)
Note: See TracTickets for help on using tickets.