[PATCH xserver] os: avoid uninitialized offsets in backtrace

Jeffrey Smith whydoubt at gmail.com
Sat Feb 17 15:45:19 UTC 2018


Note, anytime you see "(?+0x###)" in a X backtrace, you've encountered
this issue.
With this patch it becomes "(?+0x0)".  Nothing big, but it reduces
some noise that
might be confused for signal.

See all these bugs (beware, the queries may be slow):
   https://bugs.freedesktop.org/buglist.cgi?f1=content&o1=matches&query_format=advanced&v1="(%3F%2B0x"
   https://bugzilla.redhat.com/buglist.cgi?f1=content&o1=matches&query_format=advanced&v1="(%3F%2B0x"

-- Jeff

On Thu, Feb 15, 2018 at 11:47 PM, Jeff Smith <whydoubt at gmail.com> wrote:
> When xorg_backtrace calls unw_get_proc_name and an error occurs, offset
> might not be set for the current frame.
>
> Initialize offset for each frame so that the offset from another frame
> cannot be used inadvertently.
>
> Signed-off-by: Jeff Smith <whydoubt at gmail.com>
> ---
>  os/backtrace.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/os/backtrace.c b/os/backtrace.c
> index 9e3e38edf..619bf145e 100644
> --- a/os/backtrace.c
> +++ b/os/backtrace.c
> @@ -78,6 +78,7 @@ xorg_backtrace(void)
>              break;
>          }
>
> +        off = 0;
>          ret = unw_get_proc_name(&cursor, procname, 256, &off);
>          if (ret && ret != -UNW_ENOMEM) {
>              if (ret != -UNW_EUNSPEC)
> --
> 2.14.3
>


More information about the xorg-devel mailing list