[asterisk-bugs] [JIRA] (ASTERISK-24479) Enable REF_DEBUG for module references

Corey Farrell (JIRA) noreply at issues.asterisk.org
Wed Feb 11 09:55:34 CST 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell closed ASTERISK-24479.
------------------------------------


> Enable REF_DEBUG for module references
> --------------------------------------
>
>                 Key: ASTERISK-24479
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24479
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: SVN, 11.13.1, 12.6.1, 13.0.0-beta3
>            Reporter: Corey Farrell
>            Assignee: Corey Farrell
>            Severity: Minor
>
> This change includes an ABI change with compatibility stubs for 11, 12 and 13.  The compatibility stubs will not be included in trunk.  The point of this change is to have each module create an AO2 object on load, and hopefully destroy it on unload.  This allows module reference count errors to be debugged through REF_DEBUG.
> When REF_DEBUG is enabled:
> * adds an empty ao2 object to 'struct ast_module'
> * Allocate ao2 when the module is loaded
> * Perform an ao2_ref in each place where mod->usecount is manipulated.
> * ao2_cleanup on module unload.
> The passthrough of file, line and func is needed for the REF_DEBUG to be of any use, so without the ABI changes this is not useful.
> The change to bridge_builtin_features.c ensures that the module cannot be manually unloaded, but is able to be unloaded during ast_module_shutdown.  Note ast_module_shutdown only happens during clean shutdown and does not actually run dlclose so this is safe.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list