[asterisk-bugs] [JIRA] (ASTERISK-28810) Segmentation fault in ast_manager_build_channel_state_string_prefix

George Joseph (JIRA) noreply at issues.asterisk.org
Thu Apr 9 09:32:25 CDT 2020


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

George Joseph commented on ASTERISK-28810:
------------------------------------------

When you get a merge conflict in Gerrit, the best thing to do is...
* In you local development tree, checkout the branch you were trying to cherry-pick to.
* Do a {{git cherry-pick <commitid>}} or a {{git review -x <gerrit_change_num>}}

Sometimes Gerrit will indicate a conflict but a local cherry-pick will work.  If the cherry-pick succeeds, you only have to do a {{git review -t <topic> <new_branch>}} to push the cherry-pick back up to gerrit.  

If it failed, do a {{git status}} to see the files in conflict, fix them, do a {{git add <file>}}, then do a {{git cherry-pick --continue}}.  When it finally succeeds, you can do a {{git review -t <topic> <new_branch>}} to push the cherry-pick back up to gerrit.  

One other thing I'll say is that it's probably better to get at least 1 "+1" code review before cherry-picking.  This way if changes are necessary, you only have to make them in one branch.  Usually, one of us will comment on the review "OK to cherry-pick to ..." when it's safe.

I'll add these instructions to the wiki page.

Thanks for submitting the patch yourself!  We appreciate that.



> Segmentation fault in ast_manager_build_channel_state_string_prefix
> -------------------------------------------------------------------
>
>                 Key: ASTERISK-28810
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28810
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Channels
>    Affects Versions: 16.9.0
>         Environment: docker ubuntu 18.04
>            Reporter: Robert Sutton
>            Assignee: Unassigned
>         Attachments: patch.txt
>
>
> We are having daily core dumps.
> ast_manager_build_channel_state_string_prefix was passed a null snapshot, upon looking around the code base there are many paths where it is called with out first checking.
> This problem will keep happening if it is reliant on callers of this method to first check the arg. The simple solution is to do a null check on the snapshot in ast_manager_build_channel_state_string_prefix and return NULL.
> I will attach a patch shortly.
> #0  ast_manager_build_channel_state_string_prefix (snapshot=0x0, prefix=0x62f514 "") at manager_channels.c:496
>         out = <error reading variable out (Cannot access memory at address 0x7f794f496cd0)>
>         caller_name = <optimized out>
>         connected_name = <optimized out>
>         res = <optimized out>
>         __PRETTY_FUNCTION__ = "ast_manager_build_channel_state_string_prefix"



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



More information about the asterisk-bugs mailing list