[ABRT PATCH] abrt-handle-event: don't crash on duplicate detection, rhbz#1001894

Jakub Filak jfilak at redhat.com
Mon Sep 9 07:32:05 UTC 2013


Hmm, I've already sent a patch fixing this particular bug
https://lists.fedorahosted.org/pipermail/crash-catcher/2013-August/005276.html



On Mon, 2013-09-02 at 16:09 +0200, Richard Marko wrote:
> This prevents abrt-handle-event from crashing when
> satyr is unable to get crash thread of one of the
> backtraces (e.g. when processing failure results in
> core_backtrace file with no threads at all).
> 
> Signed-off-by: Richard Marko <rmarko at redhat.com>
> ---
>  src/daemon/abrt-handle-event.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/daemon/abrt-handle-event.c b/src/daemon/abrt-handle-event.c
> index e104cb7..fc0e0ea 100644
> --- a/src/daemon/abrt-handle-event.c
> +++ b/src/daemon/abrt-handle-event.c
> @@ -62,6 +62,15 @@ static int core_backtrace_is_duplicate(struct sr_stacktrace *bt1,
>      struct sr_thread *thread1 = sr_stacktrace_find_crash_thread(bt1);
>      struct sr_thread *thread2 = sr_stacktrace_find_crash_thread(bt2);
>  
> +    /* sr_stacktrace_find_crash_thread may return NULL if core backtrace is not generated properly
> +     * which probably means there's a bug somewhere in satyr
> +     */
> +    if (thread1 == NULL || thread2 == NULL)
> +    {
> +        VERB1 log("Unable to find crash thread of one of the backtraces, considering it not duplicate");
> +        return 0;
> +    }
> +
>      int length2 = sr_thread_frame_count(thread2);
>  
>      if (length2 <= 0)




More information about the Crash-catcher mailing list