Merge branch 'matthiasc/for-main' into 'main'

Revert "ci: More verbose output from asan"

See merge request GNOME/gtk!6063
This commit is contained in:
Matthias Clasen 2023-06-06 01:37:47 +00:00
commit 97a4cc301a
8 changed files with 66 additions and 21 deletions

View File

@ -385,7 +385,6 @@ asan-build:
tags: [ asan ]
stage: analysis
needs: []
when: manual
variables:
script:
- export PATH="$HOME/.local/bin:$PATH"

View File

@ -9,7 +9,7 @@ backend=$2
multiplier=${MESON_TEST_TIMEOUT_MULTIPLIER:-1}
# Ignore memory leaks lower in dependencies
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:verbosity=1:log_threads=1
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:detect_leaks=0:allocator_may_return_null=1
export G_SLICE=always-malloc
case "${backend}" in

View File

@ -383,6 +383,9 @@ gdk_display_dispose (GObject *object)
#endif
g_clear_error (&priv->gl_error);
for (GList *l = display->seats; l; l = l->next)
g_object_run_dispose (G_OBJECT (l->data));
G_OBJECT_CLASS (gdk_display_parent_class)->dispose (object);
}

View File

@ -698,7 +698,36 @@ gdk_wayland_display_dispose (GObject *object)
g_list_free_full (display_wayland->on_has_globals_closures, g_free);
g_clear_pointer (&display_wayland->cursor_theme, wl_cursor_theme_destroy);
g_clear_pointer (&display_wayland->compositor, wl_compositor_destroy);
g_clear_pointer (&display_wayland->xdg_wm_base, xdg_wm_base_destroy);
g_clear_pointer (&display_wayland->zxdg_shell_v6, zxdg_shell_v6_destroy);
g_clear_pointer (&display_wayland->gtk_shell, gtk_shell1_destroy);
g_clear_pointer (&display_wayland->data_device_manager, wl_data_device_manager_destroy);
g_clear_pointer (&display_wayland->subcompositor, wl_subcompositor_destroy);
g_clear_pointer (&display_wayland->pointer_gestures, zwp_pointer_gestures_v1_destroy);
g_clear_pointer (&display_wayland->primary_selection_manager, zwp_primary_selection_device_manager_v1_destroy);
g_clear_pointer (&display_wayland->tablet_manager, zwp_tablet_manager_v2_destroy);
g_clear_pointer (&display_wayland->xdg_exporter, zxdg_exporter_v1_destroy);
g_clear_pointer (&display_wayland->xdg_exporter_v2, zxdg_exporter_v2_destroy);
g_clear_pointer (&display_wayland->xdg_importer, zxdg_importer_v1_destroy);
g_clear_pointer (&display_wayland->xdg_importer_v2, zxdg_importer_v2_destroy);
g_clear_pointer (&display_wayland->keyboard_shortcuts_inhibit, zwp_keyboard_shortcuts_inhibit_manager_v1_destroy);
g_clear_pointer (&display_wayland->server_decoration_manager, org_kde_kwin_server_decoration_manager_destroy);
g_clear_pointer (&display_wayland->xdg_output_manager, zxdg_output_manager_v1_destroy);
g_clear_pointer (&display_wayland->idle_inhibit_manager, zwp_idle_inhibit_manager_v1_destroy);
g_clear_pointer (&display_wayland->xdg_activation, xdg_activation_v1_destroy);
g_clear_pointer (&display_wayland->fractional_scale, wp_fractional_scale_manager_v1_destroy);
g_clear_pointer (&display_wayland->viewporter, wp_viewporter_destroy);
g_clear_pointer (&display_wayland->shm, wl_shm_destroy);
g_clear_pointer (&display_wayland->wl_registry, wl_registry_destroy);
g_list_store_remove_all (display_wayland->monitors);
G_OBJECT_CLASS (gdk_wayland_display_parent_class)->dispose (object);
g_clear_pointer (&display_wayland->wl_display, wl_display_disconnect);
}
static void
@ -708,22 +737,17 @@ gdk_wayland_display_finalize (GObject *object)
_gdk_wayland_display_finalize_cursors (display_wayland);
g_object_unref (display_wayland->monitors);
g_free (display_wayland->startup_notification_id);
g_free (display_wayland->cursor_theme_name);
xkb_context_unref (display_wayland->xkb_context);
g_clear_pointer (&display_wayland->cursor_theme, wl_cursor_theme_destroy);
g_list_store_remove_all (display_wayland->monitors);
g_object_unref (display_wayland->monitors);
if (display_wayland->settings)
g_hash_table_destroy (display_wayland->settings);
g_clear_object (&display_wayland->settings_portal);
wl_display_disconnect (display_wayland->wl_display);
G_OBJECT_CLASS (gdk_wayland_display_parent_class)->finalize (object);
}

View File

@ -98,7 +98,6 @@ struct _GdkWaylandDisplay
struct xdg_wm_base *xdg_wm_base;
struct zxdg_shell_v6 *zxdg_shell_v6;
struct gtk_shell1 *gtk_shell;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
struct wl_subcompositor *subcompositor;
struct zwp_pointer_gestures_v1 *pointer_gestures;

View File

@ -3875,6 +3875,23 @@ gdk_wayland_pointer_data_finalize (GdkWaylandPointerData *pointer)
g_slist_free (pointer->pointer_surface_outputs);
}
static void
gdk_wayland_seat_dispose (GObject *object)
{
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (object);
g_clear_pointer (&seat->wl_seat, wl_seat_destroy);
g_clear_pointer (&seat->wl_pointer, wl_pointer_destroy);
g_clear_pointer (&seat->wl_keyboard, wl_keyboard_destroy);
g_clear_pointer (&seat->wl_touch, wl_touch_destroy);
g_clear_pointer (&seat->wp_pointer_gesture_swipe, zwp_pointer_gesture_swipe_v1_destroy);
g_clear_pointer (&seat->wp_pointer_gesture_pinch, zwp_pointer_gesture_pinch_v1_destroy);
g_clear_pointer (&seat->wp_pointer_gesture_hold, zwp_pointer_gesture_hold_v1_destroy);
g_clear_pointer (&seat->wp_tablet_seat, zwp_tablet_seat_v2_destroy);
G_OBJECT_CLASS (gdk_wayland_seat_parent_class)->dispose (object);
}
static void
gdk_wayland_seat_finalize (GObject *object)
{
@ -4189,6 +4206,7 @@ gdk_wayland_seat_class_init (GdkWaylandSeatClass *klass)
GdkSeatClass *seat_class = GDK_SEAT_CLASS (klass);
object_class->finalize = gdk_wayland_seat_finalize;
object_class->dispose = gdk_wayland_seat_dispose;
seat_class->get_capabilities = gdk_wayland_seat_get_capabilities;
seat_class->grab = gdk_wayland_seat_grab;

View File

@ -623,7 +623,6 @@ add_wayland_protocols (GdkDisplay *display,
append_wayland_protocol_row (gen, (struct wl_proxy *)d->xdg_wm_base);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->zxdg_shell_v6);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->gtk_shell);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->input_device);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->data_device_manager);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->subcompositor);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->pointer_gestures);

View File

@ -7,14 +7,17 @@ env.prepend('LD_PRELOAD', project_build_root / 'gtk' / 'libgtk-4.so')
env.prepend('MESON_CURRENT_SOURCE_DIR', meson.current_source_dir())
env.prepend('MESON_CURRENT_BUILD_DIR', meson.current_build_dir())
test('monitor',
find_program('run-headless-monitor-tests.sh', dirs: meson.current_source_dir()),
suite: ['headless'],
env: env,
)
# asan does not work with our use of LD_PRELOAD for these tests
if get_option('b_sanitize') != 'address'
test('monitor',
find_program('run-headless-monitor-tests.sh', dirs: meson.current_source_dir()),
suite: ['headless'],
env: env,
)
test('input',
find_program('run-headless-input-tests.sh', dirs: meson.current_source_dir()),
suite: ['headless'],
env: env,
)
test('input',
find_program('run-headless-input-tests.sh', dirs: meson.current_source_dir()),
suite: ['headless'],
env: env,
)
endif