Bug in PJSUA sample app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ming,

The stack trace shows the following calling sequence when a SIGSEGV :
SEGV_MAPERR occurs:

  pjmedia_delay_buf_destroy
  pjmedia_conf_destroy
  pjsua_aud_subsys_destroy
  pjsua_media_subsys_destroy
  pjsua_destroy2
  voip_destroy

Valgrind indicated that app_config.pool was being accessed but it had been
released.

Thanks for the feedback. I shall investigate further  :-)


Warmest regards,

Jeff




On Fri, Apr 4, 2014 at 2:06 AM, Ming <ming at teluu.com> wrote:

> Hi Jeff,
>
> app_config.pool should be the application's pool, which pjsua (or
> pjsua_destroy()) should have no knowledge of. Thus, application should do
> the cleanup prior to calling pjsua_destroy() (such as exemplified in
> app_destroy() in pjsua_app.c). So perhaps the bug could be somewhere else?
>
> Regards,
> Ming
>
>
> On Thu, Apr 3, 2014 at 4:56 PM, Jeff Localphone <jeff.localphone at gmail.com
> > wrote:
>
>> Hi,
>>
>> pjsua_app.c (
>> http://svn.pjsip.org/repos/pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c)
>> contains a bug which might cause problems for people adapting this sample
>> application.
>>
>>
>> This code:
>>
>>
>>     if (app_config.pool) {
>> pj_pool_release(app_config.pool);
>> app_config.pool = NULL;
>>     }
>>
>>     status = pjsua_destroy();
>>
>>
>> ought to be:
>>
>>
>>     status = pjsua_destroy();
>>
>>      if (app_config.pool) {
>> pj_pool_release(app_config.pool);
>> app_config.pool = NULL;
>>     }
>>
>>
>> because pjsua_destroy() makes use of app_config.pool (e.g. in
>> pjmedia_delay_buf_destroy()) so the pool ought not to be released until
>> after pjsua_destroy() returns.
>>
>>
>> Warmest regards,
>>
>> Jeff Lawson
>> Software Development
>> Localphone <http://www.localphone.com/> - *ITSPA Award for Best Consumer
>> VoIP Provider 2013/2014*
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>


-- 

Jeff Lawson
Software Development
Localphone <http://www.localphone.com/> - *ITSPA Award for Best Consumer
VoIP Provider 2013*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140404/4a06bf87/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux