weston/tests
Marius Vlad 5af8340a00 weston-test: Proper release pointer/seat on shutdown path
For fixing the following UAF.

==191==ERROR: AddressSanitizer: heap-use-after-free on address 0x518000000168 at pc 0x7f7aac77493e bp 0x7ffdd9dddc00 sp 0x7ffdd9dddbf8
READ of size 8 at 0x518000000168 thread T0
    #0 0x7f7aac77493d in udev_input_destroy ../libweston/libinput-seat.c:388
    #1 0x7f7aac73e632 in drm_shutdown ../libweston/backend-drm/drm.c:3623
    #2 0x7f7aad9208b8 in weston_compositor_shutdown_backends ../libweston/compositor.c:10337
    #3 0x7f7aad920a7d in weston_compositor_destroy ../libweston/compositor.c:10367
    #4 0x7f7aada35ed8 in wet_main ../frontend/main.c:4934
    #5 0x561e808014d6 in execute_compositor ../tests/weston-test-fixture-compositor.c:431
    #6 0x561e8080556b in weston_test_harness_execute_as_client ../tests/weston-test-runner.c:570
    #7 0x561e807efe1d in fixture_setup ../tests/drm-writeback-screenshot-test.c:48
    #8 0x561e807efe9e in fixture_setup_run_ ../tests/drm-writeback-screenshot-test.c:50
    #9 0x561e80805bb6 in main ../tests/weston-test-runner.c:726
    #10 0x7f7aad496ca7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0x7f7aad496d64 in __libc_start_main_impl ../csu/libc-start.c:360
    #12 0x561e807ef860 in _start (/home/mvlad/vkms/weston/b/tests/test-drm-writeback-screenshot+0xe860) (BuildId: 9f9e2ed12b9317dd859498374500f2406c32e5d3)

0x518000000168 is located 232 bytes inside of 792-byte region [0x518000000080,0x518000000398)
freed by thread T0 here:
    #0 0x7f7aadb588f8 in free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7f7aac3f2f9d in wet_module_init ../tests/weston-test.c:878
    #2 0x7f7aada1b425 in wet_load_module ../frontend/main.c:989
    #3 0x7f7aada1b9eb in load_modules ../frontend/main.c:1069
    #4 0x7f7aada35711 in wet_main ../frontend/main.c:4865
    #5 0x561e808014d6 in execute_compositor ../tests/weston-test-fixture-compositor.c:431
    #6 0x561e8080556b in weston_test_harness_execute_as_client ../tests/weston-test-runner.c:570
    #7 0x561e807efe1d in fixture_setup ../tests/drm-writeback-screenshot-test.c:48
    #8 0x561e807efe9e in fixture_setup_run_ ../tests/drm-writeback-screenshot-test.c:50
    #9 0x561e80805bb6 in main ../tests/weston-test-runner.c:726
    #10 0x7f7aad496ca7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

previously allocated by thread T0 here:
    #0 0x7f7aadb59610 in calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f7aac3eedc5 in zalloc ../include/libweston/zalloc.h:38
    #2 0x7f7aac3f2c55 in wet_module_init ../tests/weston-test.c:836
    #3 0x7f7aada1b425 in wet_load_module ../frontend/main.c:989
    #4 0x7f7aada1b9eb in load_modules ../frontend/main.c:1069
    #5 0x7f7aada35711 in wet_main ../frontend/main.c:4865
    #6 0x561e808014d6 in execute_compositor ../tests/weston-test-fixture-compositor.c:431
    #7 0x561e8080556b in weston_test_harness_execute_as_client ../tests/weston-test-runner.c:570
    #8 0x561e807efe1d in fixture_setup ../tests/drm-writeback-screenshot-test.c:48
    #9 0x561e807efe9e in fixture_setup_run_ ../tests/drm-writeback-screenshot-test.c:50
    #10 0x561e80805bb6 in main ../tests/weston-test-runner.c:726
    #11 0x7f7aad496ca7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

This would be caused by not being able to compile keymaps.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-09-12 14:46:43 +01:00
..
reference color-lcms: change stock sRGB to true power-2.2 2025-06-03 15:47:20 +03:00
visualization tests/alpha-blending: replace compare_float() with rgb_diff_stat 2022-06-30 09:08:32 +00:00
alpha-blending-test.c color-lcms: change stock sRGB to true power-2.2 2025-06-03 15:47:20 +03:00
assert-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
bad-buffer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
buffer-transforms-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
client-buffer-test.c tests/client-buffer: Update Vulkan format mustpass list for CI 2025-09-08 12:02:11 +01:00
color-icc-output-test.c tests/color-icc-output: relax max error tolerances 2025-07-24 11:30:07 +03:00
color-lcms-optimizer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
color-management-parametric-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
color-management-test.c tests: drop EOTF from TRANSFER_FN_SRGB_EOTF 2025-06-03 15:47:20 +03:00
color-math-test.c color: add Bradford matrix computation 2025-07-28 13:14:01 +03:00
color-metadata-errors-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
color-metadata-parsing-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
color_util.c color-lcms: change stock sRGB to true power-2.2 2025-06-03 15:47:20 +03:00
color_util.h tests/color_util: add power-2.2 transfer function 2025-06-03 15:47:20 +03:00
config-parser-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
constraints-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
custom-env-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
devices-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
drm-formats-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
drm-smoke-test.c tests: drm-smoke: Stop hardcoding output name to Virtual-1 2025-09-09 14:03:26 +02:00
drm-writeback-screenshot-test.c tests: Use new buffer for second screenshot 2025-07-17 10:42:30 +03:00
event-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
idalloc-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
image-iter.h tests: Port all test clients to the new test asserts 2025-02-26 23:50:41 +01:00
input-timestamps-helper.c tests: Port all test clients to the new test asserts 2025-02-26 23:50:41 +01:00
input-timestamps-helper.h tests: Introduce input timestamps helper 2018-02-20 10:20:29 +02:00
internal-screenshot-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
iterate-debug-scopes-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
ivi-layout-internal-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
ivi-layout-test-client.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
ivi-layout-test-plugin.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
ivi-shell-app-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
ivi-test.h ivi-shell: implement surface_on_many_layer test 2016-06-29 11:32:23 +03:00
keyboard-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
kiosk-shell-test.c weston-test-client-helper: Move helpers into weston-test-client-helper 2025-05-06 15:27:58 +03:00
lcms-util-test.c tests: drop EOTF from TRANSFER_FN_SRGB_EOTF 2025-06-03 15:47:20 +03:00
lcms_util.c color-lcms: change stock sRGB to true power-2.2 2025-06-03 15:47:20 +03:00
lcms_util.h tests: replace lcmsMAT3 with weston_mat3f 2025-04-01 15:59:54 +03:00
linalg-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
linux-explicit-synchronization-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
lua-shell-test.c lua-shell: Add lua-shell 2025-06-04 15:47:06 +03:00
matrix-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
matrix-transform-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
meson.build tests/client-buffer: Use shared client-buffer utils 2025-09-05 11:47:18 +02:00
output-capture-protocol-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
output-damage-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
output-decorations-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
output-transforms-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
paint-node-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
plugin-registry-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
pointer-shot-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
pointer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
presentation-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
roles-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
safe-signal-output-removal-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
safe-signal-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
setbacklight.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
single-pixel-buffer-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
string-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
subsurface-shot-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
subsurface-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
surface-global-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
surface-screenshot-test.c Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
surface-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
text-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
timespec-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
touch-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
vertex-clip-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
viewporter-shot-test.c tests: Add support for Vulkan renderer 2025-05-23 20:36:05 +01:00
viewporter-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00
weston-test-assert.h tests: Don't abort on failure 2025-02-26 23:50:45 +01:00
weston-test-client-helper.c weston-test-client-helper: Use shared client-buffer utils 2025-09-05 11:47:18 +02:00
weston-test-client-helper.h weston-test-client-helper: Use shared client-buffer utils 2025-09-05 11:47:18 +02:00
weston-test-desktop-shell.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
weston-test-fixture-compositor.c lua-shell: Add lua-shell 2025-06-04 15:47:06 +03:00
weston-test-fixture-compositor.h lua-shell: Add lua-shell 2025-06-04 15:47:06 +03:00
weston-test-runner.c gitlab-ci: Create some jobs for Vulkan build coverage 2025-05-23 20:36:05 +01:00
weston-test-runner.h tests: return status from each test definition 2025-04-30 15:07:35 +03:00
weston-test.c weston-test: Proper release pointer/seat on shutdown path 2025-09-12 14:46:43 +01:00
weston-testsuite-data.h tests: Don't abort on failure 2025-02-26 23:50:45 +01:00
xcb-client-helper.c tests: Port all test clients to the new test asserts 2025-02-26 23:50:41 +01:00
xcb-client-helper.h tests: Port all test clients to the new test asserts 2025-02-26 23:50:41 +01:00
xdg-client-helper.c xdg-client-helper: Use a default WINDOW size value 2025-05-06 15:30:37 +03:00
xdg-client-helper.h xdg-client-helper: Use a default WINDOW size value 2025-05-06 15:30:37 +03:00
xwayland-test.c tests: return status from each test definition 2025-04-30 15:07:35 +03:00