mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
scene/surface: fix NULL deref when source buffer is destroyed
Fixes the following crash, witnessed after a GPU reset:
#0 0x00007fba9a32774c n/a (libc.so.6 + 0x9774c)
#1 0x00007fba9a2cddc0 raise (libc.so.6 + 0x3ddc0)
#2 0x00007fba9a2b557a abort (libc.so.6 + 0x2557a)
#3 0x00007fba9a2b54e3 n/a (libc.so.6 + 0x254e3)
#4 0x00007fba9a53fb78 wlr_linux_drm_syncobj_v1_state_signal_release_with_buffer (libwlroots-0.20.so + 0x26b78)
#5 0x00007fba9a590846 surface_reconfigure (libwlroots-0.20.so + 0x77846)
#6 0x00007fba9a590cbb scene_surface_set_clip (libwlroots-0.20.so + 0x77cbb)
#7 0x00007fba9a590efa subsurface_tree_set_clip (libwlroots-0.20.so + 0x77efa)
#8 0x00007fba9a590f1f subsurface_tree_set_clip (libwlroots-0.20.so + 0x77f1f)
#9 0x00007fba9a590f1f subsurface_tree_set_clip (libwlroots-0.20.so + 0x77f1f)
#10 0x00007fba9a590f8d wlr_scene_subsurface_tree_set_clip (libwlroots-0.20.so + 0x77f8d)
Reported-by: Hubert Hirtz <hubert@hirtz.pm>
This commit is contained in:
parent
b62c6878e1
commit
bd566225ea
1 changed files with 2 additions and 1 deletions
|
|
@ -245,7 +245,8 @@ static void surface_reconfigure(struct wlr_scene_surface *scene_surface) {
|
|||
&surface->buffer->base, &options);
|
||||
|
||||
if (syncobj_surface_state != NULL &&
|
||||
(surface->current.committed & WLR_SURFACE_STATE_BUFFER)) {
|
||||
(surface->current.committed & WLR_SURFACE_STATE_BUFFER) &&
|
||||
surface->buffer->source != NULL) {
|
||||
wlr_linux_drm_syncobj_v1_state_signal_release_with_buffer(syncobj_surface_state,
|
||||
surface->buffer->source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue