wlroots/render
John Lindgren 16cb509a6e render/allocator: add missing wlr_buffer_finish() in destroy impls
Fixes use-after-free on exit of labwc running nested:

==50906== Invalid write of size 8
==50906==    at 0x4A85403: wl_list_remove (wayland-util.c:57)
==50906==    by 0x40BBAF9: destroy_wl_buffer (output.c:146)
==50906==    by 0x40B9B4F: backend_destroy (backend.c:488)
==50906==    by 0x409E96F: wlr_backend_destroy (backend.c:68)
==50906==    by 0x40B78A6: multi_backend_destroy (backend.c:62)
==50906==    by 0x409E96F: wlr_backend_destroy (backend.c:68)
==50906==    by 0x4043DA0: server_finish (server.c:788)
==50906==    by 0x403AA85: main (main.c:277)
==50906==  Address 0xb4435e8 is 40 bytes inside a block of size 136 free'd
==50906==    at 0x4A3E8EF: free (vg_replace_malloc.c:989)
==50906==    by 0x409C954: buffer_destroy (shm.c:28)
==50906==    by 0x40E96F4: buffer_consider_destroy (buffer.c:42)
==50906==    by 0x40E9754: wlr_buffer_drop (buffer.c:52)
==50906==    by 0x41498DA: slot_reset (swapchain.c:44)
==50906==    by 0x4149933: wlr_swapchain_destroy (swapchain.c:53)
==50906==    by 0x40CB1FA: wlr_output_finish (output.c:410)
==50906==    by 0x40BE00B: output_destroy (output.c:957)
==50906==    by 0x40CB2FC: wlr_output_destroy (output.c:436)
==50906==    by 0x40B9AFC: backend_destroy (backend.c:481)
==50906==    by 0x409E96F: wlr_backend_destroy (backend.c:68)
==50906==    by 0x40B78A6: multi_backend_destroy (backend.c:62)
==50906==  Block was alloc'd at
==50906==    at 0x4A42C13: calloc (vg_replace_malloc.c:1675)
==50906==    by 0x409CA84: allocator_create_buffer (shm.c:68)
==50906==    by 0x409C7BA: wlr_allocator_create_buffer (allocator.c:186)
==50906==    by 0x4149B80: wlr_swapchain_acquire (swapchain.c:102)
==50906==    by 0x40C90DA: render_cursor_buffer (cursor.c:246)
==50906==    by 0x40C93DC: output_cursor_attempt_hardware (cursor.c:303)
==50906==    by 0x40C9A61: output_cursor_set_texture (cursor.c:420)
==50906==    by 0x40C9738: wlr_output_cursor_set_buffer (cursor.c:352)
==50906==    by 0x40F13A0: output_cursor_set_xcursor_image (wlr_cursor.c:507)
==50906==    by 0x40F1B28: cursor_output_cursor_update (wlr_cursor.c:630)
==50906==    by 0x40F1C2A: cursor_update_outputs (wlr_cursor.c:657)
==50906==    by 0x40F1CF9: wlr_cursor_set_xcursor (wlr_cursor.c:674)

Fixes: 7963ba6a0d
("buffer: introduce wlr_buffer_finish()")
2025-12-20 15:02:08 -05:00
..
allocator render/allocator: add missing wlr_buffer_finish() in destroy impls 2025-12-20 15:02:08 -05:00
gles2 Fix/cleanup includes a bit 2025-04-15 20:13:29 +03:00
pixman render/pixman: add support for ABGR16161616 2025-12-18 09:48:02 -05:00
vulkan render/vulkan: normalize luminance range in bt.1886 formula 2025-12-11 21:04:41 +00:00
color.c render/color: assert that wlr_color_transform_pipeline contains no NULLs 2025-12-18 14:58:28 +00:00
color_fallback.c render/color: replace COLOR_TRANSFORM_LUT_3D with COLOR_TRANSFORM_LCMS2 2025-06-16 09:06:10 +00:00
color_lcms2.c render/color: replace COLOR_TRANSFORM_LUT_3D with COLOR_TRANSFORM_LCMS2 2025-06-16 09:06:10 +00:00
dmabuf.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
dmabuf_fallback.c render/dmabuf: add dmabuf_export_sync_file() 2022-12-06 14:54:09 +00:00
dmabuf_linux.c render/dmabuf: add dmabuf_export_sync_file() 2022-12-06 14:54:09 +00:00
drm_format_set.c render/drm_format_set: fix corruption in wlr_drm_format_set_remove() 2024-11-28 19:14:31 +00:00
drm_syncobj.c render/drm_syncobj: fix return type mismatch 2025-05-06 17:48:54 +08:00
egl.c render/egl: fix software rendering check 2025-06-29 10:57:56 +02:00
meson.build build: check eglext.h header version 2024-06-27 17:54:57 +00:00
pass.c render/pass: Ensure the precision is consistent during comparison 2025-05-29 21:50:21 +08:00
pixel_format.c render/pixel-format: Move has_alpha into it's own array 2024-01-31 13:47:17 -05:00
swapchain.c swapchain: assert that size is not empty at creation time 2025-06-16 07:54:00 +00:00
wlr_renderer.c Fix/cleanup includes a bit 2025-04-15 20:13:29 +03:00
wlr_texture.c wlr_texture: Introduce wlr_texture_preferred_read_format 2023-11-30 19:56:54 -05:00