mesa/src
Johan Klokkhammer Helsing dab02dea34 st/dri: Fix dangling pointer to a destroyed dri_drawable
If an EGLSurface is created, made current and destroyed, and then a second
EGLSurface is created. Then the second malloc in driCreateNewDrawable may
return the same pointer address the first surface's drawable had.
Consequently, when dri_make_current later tries to determine if it should
update the texture_stamp it compares the surface's drawable pointer against
the drawable in the last call to dri_make_current and assumes it's the same
surface (which it isn't).

When texture_stamp is left unset, then dri_st_framebuffer_validate thinks
it has already called update_drawable_info for that drawable, leaving it
unvalidated and this is when bad things starts to happen. In my case it
manifested itself by the width and height of the surface being unset.

This is fixed this by setting the pointer to NULL before freeing the
surface.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106126
Signed-off-by: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
2018-04-23 04:25:40 -04:00
..
amd radv: mark const structs as extern in header file to avoid lto damage 2018-04-23 05:55:22 +10:00
broadcom util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero 2018-03-29 14:09:23 -07:00
compiler autotools: Include new meson files 2018-04-20 20:26:56 -07:00
egl x11: Only report supported DRI3/Present versions 2018-03-30 16:53:51 +01:00
gallium st/dri: Fix dangling pointer to a destroyed dri_drawable 2018-04-23 04:25:40 -04:00
gbm gbm: remove never-implemented function 2018-03-28 16:25:52 +01:00
getopt
glx meson: fix warnings about comparing unlike types 2018-04-06 15:29:53 -07:00
gtest autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
hgl meson: Add Haiku platform support v4 2018-02-16 16:56:34 -06:00
intel anv/blorp: Do the gen11 BTI flush 2018-04-20 16:30:14 -07:00
loader dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
mapi glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2) 2018-03-30 14:33:33 -06:00
mesa autotools: Include new meson files 2018-04-20 20:26:56 -07:00
util mesa: include mtypes.h less 2018-04-12 19:31:30 -04:00
vulkan vulkan: Update the XML and headers to 1.1.73 2018-04-16 07:59:25 -07:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am vulkan: Drop vk_android_native_buffer.xml 2018-04-10 19:29:49 -07:00
meson.build meson: build tests for gallium mesa state tracker 2018-04-18 09:03:57 -07:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00