[PATCH xserver] inputthread: Initialise inputThreadInfo->changed before use

Peter Hutterer peter.hutterer at who-t.net
Wed Feb 22 23:19:00 UTC 2017


On Wed, Feb 22, 2017 at 02:56:28PM +0000, Chris Wilson wrote:
> ==8734== Thread 2 InputThread:
> ==8734== Conditional jump or move depends on uninitialised value(s)
> ==8734==    at 0x2FDB05: InputThreadDoWork (inputthread.c:333)
> ==8734==    by 0x6924423: start_thread (pthread_create.c:333)
> ==8734==    by 0x6C229BE: clone (clone.S:105)
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  os/inputthread.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/os/inputthread.c b/os/inputthread.c
> index 8e7f2edb9..4400fba3f 100644
> --- a/os/inputthread.c
> +++ b/os/inputthread.c
> @@ -403,6 +403,8 @@ InputThreadPreInit(void)
>      if (!inputThreadInfo)
>          FatalError("input-thread: could not allocate memory");
>  
> +    inputThreadInfo->changed = FALSE;
> +
>      inputThreadInfo->thread = 0;
>      xorg_list_init(&inputThreadInfo->devs);
>      inputThreadInfo->fds = ospoll_create();
> -- 
> 2.11.0

remote: Updating patchwork state for https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #140285 updated using rev dcb63deb1b6337781943a7bea5bb2b04c6d76b55.
remote: I: 1 patch(es) updated to state Accepted.
To git+ssh://git.freedesktop.org/git/xorg/xserver
   23d85c5..dcb63de  master -> master


thanks

Cheers,
   Peter


More information about the xorg-devel mailing list