[asterisk-bugs] [JIRA] (ASTERISK-27974) Leaksanitizer reports libedit2 el_set EL_ADDFN wcsdup leaks

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Jul 19 04:04:54 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244177#comment-244177 ] 

Asterisk Team commented on ASTERISK-27974:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> Leaksanitizer reports libedit2 el_set EL_ADDFN wcsdup leaks
> -----------------------------------------------------------
>
>                 Key: ASTERISK-27974
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27974
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: 13.22.0, 15.5.0, 16.0.0
>            Reporter: Walter Doekes
>            Severity: Trivial
>
> When running the asterisk console with the leak sanitizer enabled, you may see this:
> {noformat}
> hostname*CLI> quit
> Disconnected from Asterisk server
> Asterisk cleanly ending (0).
> Executing last minute cleanups
> =================================================================
> ==22860==ERROR: LeakSanitizer: detected memory leaks
> Direct leak of 120 byte(s) in 2 object(s) allocated from:
>     #0 0x7f855ee95bcf in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xebcf)
>     #1 0x7f855cdaa3ee in wcsdup (/usr/lib/x86_64-linux-gnu/libedit.so.2+0x183ee)
> SUMMARY: LeakSanitizer: 120 byte(s) leaked in 2 allocation(s).
> {noformat}
> Those leaks are caused by:
> {code}
> el_set(el, EL_ADDFN, "ed-complete", "Complete argument", cli_complete);
> {code}
> But they're not an asterisk problem, but a libedit2-problem.
> It is documented in the libedit2 code (the Strdup is a macro around wcsdup):
> {code}
>         case EL_ADDFN: {          /* const char *, const char *, el_func_t */
> ...
>                 // XXX: The two strdup's leak
>                 ret = map_addfunc(el, Strdup(wargv[0]), Strdup(wargv[1]),
>                     func);
>                 ct_free_argv(wargv);
>                 break;
> {code}
> Nothing to fix on the asterisk side. Just reporting it so we have something to point to when the issue is observed.
> Other projects have also reported this. For instance:
> https://freeswitch.org/jira/si/jira.issueviews:issue-html/FS-11131/FS-11131.html ("\[FS-11131\] Memory Leak with libedit")



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



More information about the asterisk-bugs mailing list