public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Glib-Object-Introspection] rawhide: Work around a test crash with glib >= 2.89.0
@ 2026-07-28 13:10
0 siblings, 0 replies; only message in thread
From: @ 2026-07-28 13:10 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/perl-Glib-Object-Introspection
Branch : rawhide
Commit : 2a7c2eb31fe694a8e356407cc59e12b8dea679c6
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-07-28T15:09:15+02:00
Stats : +89/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Glib-Object-Introspection/c/2a7c2eb31fe694a8e356407cc59e12b8dea679c6?branch=rawhide
Log:
Work around a test crash with glib >= 2.89.0
---
diff --git a/Glib-Object-Introspection-0.052-Skip-allocating-memory-if-an-output-argument-is-not-.patch b/Glib-Object-Introspection-0.052-Skip-allocating-memory-if-an-output-argument-is-not-.patch
new file mode 100644
index 0000000..a38cc4f
--- /dev/null
+++ b/Glib-Object-Introspection-0.052-Skip-allocating-memory-if-an-output-argument-is-not-.patch
@@ -0,0 +1,82 @@
+From dd9df6251940addb92213e2c6c8c8bf966e7b9d2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Tue, 28 Jul 2026 14:29:20 +0200
+Subject: [PATCH] Skip allocating memory if an output argument is not an
+ interface
+
+After upgrading glib from 2.88.1 to 2.89.0 45 t/arrays.t dies like this:
+
+ $ LD_LIBRARY_PATH=:build prove -v -b t/arrays.t
+ [...]
+ ok 87
+ ok 88
+ Bailout called. Further testing stopped: ERROR:gperl-i11n-invoke-c.c:584:_allocate_out_mem: assertion failed: (interface_info)
+ Bail out! ERROR:gperl-i11n-invoke-c.c:584:_allocate_out_mem: assertion failed: (interface_info)
+ **
+ ERROR:gperl-i11n-invoke-c.c:584:_allocate_out_mem: assertion failed: (interface_info)
+ Failed 4/92 subtests
+
+Minimal reproducer:
+
+ #!/usr/bin/perl
+ use Glib::Object::Introspection;
+ Glib::Object::Introspection->setup (
+ basename => 'Gio',
+ version => '2.0',
+ package => 'Glib::IO');
+ Glib::IO::DBusMessage->new_signal ('/asdf/ghjk', 'de.asdf', 'ghjk')->to_blob ([]);
+
+A trigger was this glib commit:
+
+ commit aa2e66011585c029c98f6b7824a61a6aeb7dda04
+ Author: Philip Withnall <pwithnall@gnome.org>
+ Date: Wed Mar 18 16:54:42 2026 +0000
+
+ gdbusmessage: Fix a few introspection annotations
+
+ Signed-off-by: Philip Withnall <pwithnall@gnome.org>
+ [...]
+ /**
+ * g_dbus_message_to_blob:
+ * @message: A #GDBusMessage.
+ - * @out_size: Return location for size of generated blob.
+ + * @out_size: (out caller-allocates): Return location for size of generated blob.
+ * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
+ * @error: Return location for error.
+ *
+
+That changed to_blob() definition in GIR for the "out_size" argument
+from caller-allocates="0" to caller-allocates="1" and that triggered
+the assert in _allocate_out_mem() because that argument is a pointer
+to primitive type rather than an GLib interface.
+
+This patch works around the assert by avoiding the branch in
+invoke_c_code() which calls _allocate_out_mem(), to use the same code
+path that was used with glib 2.88.1.
+
+Originally I tried to implement the allocation, but that only lead to
+a memory exhaustion. Probably these primitive types are supposed to be
+handled specially.
+
+https://gitlab.gnome.org/GNOME/perl-glib-object-introspection/-/work_items/8
+https://bugzilla.redhat.com/show_bug.cgi?id=2486187
+---
+ gperl-i11n-invoke-c.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gperl-i11n-invoke-c.c b/gperl-i11n-invoke-c.c
+index 01d60f8..16493d7 100644
+--- a/gperl-i11n-invoke-c.c
++++ b/gperl-i11n-invoke-c.c
+@@ -114,7 +114,7 @@ invoke_c_code (GICallableInfo *info,
+ break;
+
+ case GI_DIRECTION_OUT:
+- if (g_arg_info_is_caller_allocates (arg_info)) {
++ if (g_arg_info_is_caller_allocates (arg_info) && g_type_info_get_interface (arg_type)) {
+ iinfo.base.aux_args[i].v_pointer =
+ _allocate_out_mem (arg_type);
+ iinfo.out_args[i].v_pointer = &iinfo.base.aux_args[i];
+--
+2.55.0
+
diff --git a/perl-Glib-Object-Introspection.spec b/perl-Glib-Object-Introspection.spec
index 7110255..8491bb4 100644
--- a/perl-Glib-Object-Introspection.spec
+++ b/perl-Glib-Object-Introspection.spec
@@ -1,6 +1,6 @@
Name: perl-Glib-Object-Introspection
Version: 0.052
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Dynamically create Perl language bindings
License: LGPL-2.1-or-later
URL: https://metacpan.org/release/Glib-Object-Introspection
@@ -9,6 +9,9 @@ Patch1: perl-Glib-Object-Introspection_lib_pattern.patch
# Use system-wide compiler flags when building test libraries. It silents
# annocheck gating tests, CPAN RT#147466, proposed to the upstream.
Patch2: Glib-Object-Introspection-0.050-Use-CFLAGS-and-LDFLAGS-from-the-envirnoment-for-buil.patch
+# Work around a test crash with glib >= 2.89.0, bug #2486187, propsed upstream
+# <https://gitlab.gnome.org/GNOME/perl-glib-object-introspection/-/work_items/8>
+Patch3: Glib-Object-Introspection-0.052-Skip-allocating-memory-if-an-output-argument-is-not-.patch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
@@ -134,6 +137,9 @@ LANG=C.UTF-8 make test
%{_libexecdir}/%{name}
%changelog
+* Tue Jul 28 2026 Petr Pisar <ppisar@redhat.com> - 0.052-5
+- Work around a test crash with glib >= 2.89.0 (bug #2486187)
+
* Wed Jul 22 2026 Jitka Plesnikova <jplesnik@redhat.com> - 0.052-4
- Perl 5.44 rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-28 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 13:10 [rpms/perl-Glib-Object-Introspection] rawhide: Work around a test crash with glib >= 2.89.0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox