Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gobject-introspection: fix leaks.
@ 2023-08-01 19:56 mhmdanas
  2023-08-04 16:54 ` [PR PATCH] [Merged]: " Duncaen
  0 siblings, 1 reply; 2+ messages in thread
From: mhmdanas @ 2023-08-01 19:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

There is a new pull request by mhmdanas against master on the void-packages repository

https://github.com/mhmdanas/void-packages gobject-introspection-fix-leak
https://github.com/void-linux/void-packages/pull/45377

gobject-introspection: fix leaks.
They cause Meson's checks to fail.

Needed for #44306.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (just tested that they make Meson's tests pass)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/45377.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gobject-introspection-fix-leak-45377.patch --]
[-- Type: text/x-diff, Size: 2692 bytes --]

From 0aa34f71d6ec543edb6995afa7ad14e1f64de166 Mon Sep 17 00:00:00 2001
From: triallax <triallax@tutanota.com>
Date: Tue, 1 Aug 2023 20:49:37 +0100
Subject: [PATCH] gobject-introspection: fix leaks.

They cause Meson's checks to fail.
---
 .../patches/fix-leaks.patch                   | 46 +++++++++++++++++++
 srcpkgs/gobject-introspection/template        |  2 +-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gobject-introspection/patches/fix-leaks.patch

diff --git a/srcpkgs/gobject-introspection/patches/fix-leaks.patch b/srcpkgs/gobject-introspection/patches/fix-leaks.patch
new file mode 100644
index 0000000000000..fa23ee7457889
--- /dev/null
+++ b/srcpkgs/gobject-introspection/patches/fix-leaks.patch
@@ -0,0 +1,46 @@
+From bf96a92ef263820d40e233814a46932cae00db41 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Tue, 18 Jul 2023 11:07:59 -0400
+Subject: [PATCH] gdump: Fix leaked io streams
+
+This makes Meson unit test fail:
+https://github.com/mesonbuild/meson/issues/11754
+---
+
+MR: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/411
+
+ girepository/gdump.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/girepository/gdump.c b/girepository/gdump.c
+index 055a8b8c1..449b260a4 100644
+--- a/girepository/gdump.c
++++ b/girepository/gdump.c
+@@ -594,6 +594,7 @@ g_irepository_dump (const char *arg, GError **error)
+   if (output == NULL)
+     {
+       g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);
++      g_object_unref (input);
+       return FALSE;
+     }
+ 
+@@ -674,11 +675,12 @@ g_irepository_dump (const char *arg, GError **error)
+       ioerror = NULL;
+     else
+       ioerror = error;
+-    if (!g_input_stream_close (G_INPUT_STREAM (in), NULL, ioerror))
+-      return FALSE;
+-    if (!g_output_stream_close (G_OUTPUT_STREAM (output), NULL, ioerror))
+-      return FALSE;
++    caught_error |= !g_input_stream_close (G_INPUT_STREAM (in), NULL, ioerror);
++    caught_error |= !g_output_stream_close (G_OUTPUT_STREAM (output), NULL, ioerror);
+   }
+ 
++  g_object_unref (in);
++  g_object_unref (output);
++
+   return !caught_error;
+ }
+-- 
+GitLab
+
diff --git a/srcpkgs/gobject-introspection/template b/srcpkgs/gobject-introspection/template
index 69f59b52fa0cc..b9e1e618784da 100644
--- a/srcpkgs/gobject-introspection/template
+++ b/srcpkgs/gobject-introspection/template
@@ -1,7 +1,7 @@
 # Template file for 'gobject-introspection'
 pkgname=gobject-introspection
 version=1.76.1
-revision=1
+revision=2
 build_style=meson
 pycompile_dirs="usr/lib/${pkgname}/giscanner"
 hostmakedepends="flex pkg-config"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: gobject-introspection: fix leaks.
  2023-08-01 19:56 [PR PATCH] gobject-introspection: fix leaks mhmdanas
@ 2023-08-04 16:54 ` Duncaen
  0 siblings, 0 replies; 2+ messages in thread
From: Duncaen @ 2023-08-04 16:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

There's a merged pull request on the void-packages repository

gobject-introspection: fix leaks.
https://github.com/void-linux/void-packages/pull/45377

Description:
They cause Meson's checks to fail.

Needed for #44306.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (just tested that they make Meson's tests pass)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-04 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 19:56 [PR PATCH] gobject-introspection: fix leaks mhmdanas
2023-08-04 16:54 ` [PR PATCH] [Merged]: " Duncaen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).