While trying to trace down a slow memory leak, and ran across a NULL pointer exception.
Here is the back trace:
#0 auc_authorize (auc_list=0x10273a2c, msg=0x0, sip=0x10304d34) at auth_client.c:727 #1 0x10059bb4 in nua_creq_msg (nua=0x10113848, nh=0x10273960, cr=0x10273994, restart=0, method=sip_method_bye, name=0x100f21d0 "BYE", tag=0x7fffe9fc, value=271541916) at nua_stack.c:1780 #2 0x10061c2c in nua_stack_bye (nua=0x10113848, nh=0x10273960, e=nua_r_bye, tags=0x102f669c) at nua_session.c:2039 #3 0x10056324 in nua_stack_signal (nua=0x10113848, msg=0x7fffeac8, e=0x102f6688) at nua_stack.c:609
#4  0x100993f4 in su_port_getmsgs (self=0x0) at su_port.c:601
#5  0x1009a388 in su_port_step (self=0x10110b30, tout=10) at su_port.c:1238
#6  0x10091d90 in su_root_step (self=0x10273a2c, tout=0) at su_port.h:295

The actual NULL pointer in auc_authorize was sip->sip_request = 0.
I'm not sure how this came about, but I assume a memory alloc failed since I've been having a memory leak.

Looking into nua_creq_msg() I see at line: 1701, msg_destroy(msg), msg = NULL; Which appears to decide something went wrong, but it allows the function to continue with msg = NULL, and I think sip maybe pointing to free'd memory.

I'm not sure how to fix this. I guess the simplest would be to check for valid msg and sip->sip_request in auc_authorize(), but I think there might be some better checking in nua_creq_msg().


Now for my real question,...
Is there some documentation on how the su memory allocation routines keep track of memory ? I get the idea of the home object. I'm not sure I understand how the sub_alloc works. With a typical nua implementation, are there more than the nua and su home objects ?
Would I expect to see all other allocations as sub objects to these two ?
Any idea's on how to track this down would be helpful. Tracking a memory leak is quite tricky.

Thanks,

Colin..






-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to