[Mesa-dev] [android-x86-devel] [RFC 1/7] st/dri: fix double free of dri_drawable

Emil Velikov emil.l.velikov at gmail.com
Fri Apr 29 09:18:38 UTC 2016


On 28 April 2016 at 08:34, Chih-Wei Huang <cwhuang at android-x86.org> wrote:
> From: WuZhen <wuzhen at jidemail.com>
>
> In the callchain destroy_surface->destroyDrawable->dri_put_drawable->
> dri_put_drawable->DestroyBuffer
>
> By the semantic of it, dri_destroy_buffer should not free drawable struct,
> all vendor specific and legacy swrast version of the function do not.
> wonder why no body else ran into this.
>
There is something subtle here (thus it was not addressed before), so
we should provide more precise detail about it.
Namely: the message should explain the exact scenario when/how the
double-free occurs.

The fact that no-one caught this, makes me wonder if the analysis is
correct or if we have a bigger bug (leaking drawables) elsewhere.

Thanks
Emil


More information about the mesa-dev mailing list