From a8bb71383a7c3f5aff1dc55b73e3637bbde30c53 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 27 Jul 2024 00:58:53 +0100 Subject: [PATCH] tests: Fix signature of GtkTestATContext::update-selection-bound handlers The signal is declared in GtkTestATContext with 0 parameters, but these handlers were written as if the signal had one `guint` parameter. On some architectures this accidentally works as intended, but on others (reproduced on i386 and riscv64) the test tries to use arbitrary stack contents as the `TestData *` and crashes when it tries to dereference the resulting non-pointer. Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6490 Signed-off-by: Simon McVittie --- testsuite/a11y/text.c | 1 - testsuite/a11y/textview.c | 1 - 2 files changed, 2 deletions(-) diff --git a/testsuite/a11y/text.c b/testsuite/a11y/text.c index 454e18c469..ef5a713851 100644 --- a/testsuite/a11y/text.c +++ b/testsuite/a11y/text.c @@ -45,7 +45,6 @@ update_caret_pos (GtkATContext *context, static void update_selection_bound (GtkATContext *context, - guint selection_bound, gpointer data) { TestData *td = data; diff --git a/testsuite/a11y/textview.c b/testsuite/a11y/textview.c index 5eb0d40659..d0a8fff92a 100644 --- a/testsuite/a11y/textview.c +++ b/testsuite/a11y/textview.c @@ -72,7 +72,6 @@ update_caret_pos (GtkATContext *context, static void update_selection_bound (GtkATContext *context, - guint selection_bound, gpointer data) { TestData *td = data;