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


View this message in rfc822 format

From: Björn Bidar <bjorn.bidar <at> thaodan.de>
To: 70352 <at> debbugs.gnu.org
Cc: yang.yingchao <at> qq.com, luangruo <at> yahoo.com, eliz <at> gnu.org
Subject: bug#70352: Fwd: Re: bug#70352: 29.3.50; emacs-pgtk: possible leak of virtual memory
Date: Fri, 10 May 2024 23:34:55 +0300
Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> 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?
>
>> ,----
>> | 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.

Doesn't seem to go that bad this time:
https://gitlab.gnome.org/GNOME/gtk/-/issues/6675

Luckily mentioning Emacs did not cause any issues.




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.