GNU bug report logs - #70352
29.3.50; emacs-pgtk: possible leak of virtual memory

Previous Next

Package: emacs;

Reported by: Yang Yingchao <yang.yingchao <at> qq.com>

Date: Fri, 12 Apr 2024 11:13:04 UTC

Severity: normal

Found in version 29.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #56 received at 70352 <at> debbugs.gnu.org (full text, mbox):

From: Yang Yingchao <yang.yingchao <at> qq.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70352 <at> debbugs.gnu.org
Subject: Re: bug#70352: Fwd: Re: bug#70352: 29.3.50; emacs-pgtk: possible
 leak of virtual memory
Date: Mon, 29 Apr 2024 20:27:52 +0800
On Mon, Apr 29 2024, Po Lu wrote:

> Yang Yingchao <yang.yingchao <at> qq.com> writes:
>
>> Could this be an issue with gtk+? I made some changes to gtk+-3.24.41,
>> and it seems like the issue has disappeared...
>
> I don't understand.  Aren't you building with GTK 4.x?

No, I thought I was using GTK 4 initially, but I'm actually using GTK+ 3...


>
>> ,----
>> | diff -urNa gtk+-3.24.41.orig/gdk/wayland/gdkwindow-wayland.c gtk+-3.24.41/gdk/wayland/gdkwindow-wayland.c
>> | --- gtk+-3.24.41.orig/gdk/wayland/gdkwindow-wayland.c	2024-01-24 09:14:34.000000000 +0800
>> | +++ gtk+-3.24.41/gdk/wayland/gdkwindow-wayland.c	2024-04-29 16:41:00.691373426 +0800
>> | @@ -952,6 +952,11 @@
>> |    /* Release came in, we haven't done any interim updates, so we can just use
>> |     * the old committed buffer again.
>> |     */
>> | +
>> | +  if (impl->staging_cairo_surface) {
>> | +    g_clear_pointer (&impl->staging_cairo_surface, cairo_surface_destroy);
>> | +  }
>> | +
>> |    impl->staging_cairo_surface = g_steal_pointer (&impl->committed_cairo_surface);
>> |  }
>> `----
>>
>> Actually, I do not understand the logic of the function
>> `buffer_release_callback()', but when debugging this issue with gdb, I
>> noticed that the `impl->staging_cairo_surface' which was created via
>> `_gdk_wayland_display_create_shm_surface' was replaced by
>> `impl->committed_cairo_surface' without being released first.
>
> I'm afraid the GDK Wayland backend is outside my line of country.
> Perhaps you ought to take this up with their developers, but be prepared
> for weeks of frustration as they presume to tell you how your program
> should bend over backwards to accommodate their misdesigns.

Sure, I'll file a bug report there.

As a Gentoo user, I can patch the source code on my machine locally,
therefore, it would not be a real issue for me even if they don't fix it.


Thanks for your time.





This bug report was last modified 1 year and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.