#1610 closed defect (fixed)
Workaround for reported crash on stun_sock's on_data_recvfrom() callback
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.1 |
Component: | pjnath | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | release-1.16 | Backported: | yes |
Description
Crash has been reported in call to PJ_ERROR below when trying to access stun_sock->obj_name:
stun_sock.c:756:
/* Callback from active socket when incoming packet is received */ static pj_bool_t on_data_recvfrom(pj_activesock_t *asock, void *data, pj_size_t size, const pj_sockaddr_t *src_addr, int addr_len, pj_status_t status) { pj_stun_sock *stun_sock; pj_stun_msg_hdr *hdr; pj_uint16_t type; stun_sock = (pj_stun_sock*) pj_activesock_get_user_data(asock); /* Log socket error */ if (status != PJ_SUCCESS) { PJ_PERROR(2,(stun_sock->obj_name, status, "recvfrom() error")); return PJ_TRUE; }
It is suspected that the stun_sock may no longer be valid when the callback is called, possibly because it has been destroyed. A more general synchronization fix is currently being developed, therefore this is considered as a workaround.
Thank you Itay Bianco for the report.
Change History (5)
comment:1 Changed 12 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 12 years ago by bennylp
In 4324:
comment:3 Changed 12 years ago by nanang
In 4344:
comment:4 Changed 12 years ago by riza
In 4400:
comment:5 Changed 12 years ago by riza
- Backported set
Note: See
TracTickets for help on using
tickets.
In 4321: