Chris Wilson wrote:
> The callback data passed by reference to the hook was allocated on stack
> within the scope of the case statement. The compiler is free to reuse
> any of that stack space whilst making the function call so we may end up
> passing garbage into the callback.

Did the hw/xfree86/modes/xf86Crtc.c hunk sneak in by mistake?   Seems unrelated:

> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
> index b2daec7..3cbaa08 100644
> --- a/hw/xfree86/modes/xf86Crtc.c
> +++ b/hw/xfree86/modes/xf86Crtc.c
> @@ -1393,7 +1393,13 @@ xf86ModeCompare (DisplayModePtr a, DisplayModePtr b)
>      if (diff)
>       return diff;
>      diff = b->Clock - a->Clock;
> -    return diff;
> +    if (diff)
> +         return diff;
> +    if (a->Private)
> +         return -1;
> +    if (b->Private)
> +         return 1;
> +    return 0;
>  }
>  
>  /**


-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to