From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70352: Fwd: Re: bug#70352: 29.3.50; emacs-pgtk: possible leak of virtual memory Date: Thu, 09 May 2024 10:35:38 +0300 Message-ID: <86seyr77zp.fsf@gnu.org> References: <87zfty2fh6.fsf@yahoo.com> <86sezprawz.fsf@gnu.org> <87v84l34uy.fsf@yahoo.com> <86bk6dpj2c.fsf@gnu.org> <874jc43gjx.fsf@yahoo.com> <86frvoo5pi.fsf@gnu.org> <87sezo1mr2.fsf@yahoo.com> <867ch0o0wi.fsf@gnu.org> <699acc927ca7decaaac0d06a59c80426bb9ae3059c3eebd7cced56cb021310bf@mu.id> <87wmoz75g4.fsf@qq.com> <86o79vw6ii.fsf@gnu.org> <87wmogcrxc.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20475"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70352@debbugs.gnu.org To: luangruo@yahoo.com, Yang Yingchao Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 09 09:36:57 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4yKl-0005Gr-B0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 May 2024 09:36:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4yKT-0002lt-Ij; Thu, 09 May 2024 03:36:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4yKS-0002lY-3r for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:36:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4yKR-0003gA-Rv for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:36:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4yKr-0001cE-MO for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2024 07:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70352 X-GNU-PR-Package: emacs Original-Received: via spool by 70352-submit@debbugs.gnu.org id=B70352.17152401806190 (code B ref 70352); Thu, 09 May 2024 07:37:01 +0000 Original-Received: (at 70352) by debbugs.gnu.org; 9 May 2024 07:36:20 +0000 Original-Received: from localhost ([127.0.0.1]:53686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4yKB-0001bm-HG for submit@debbugs.gnu.org; Thu, 09 May 2024 03:36:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4yK4-0001bd-Al for 70352@debbugs.gnu.org; Thu, 09 May 2024 03:36:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4yJX-0003GV-OJ; Thu, 09 May 2024 03:35:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4Dfdf16gwpstx1HJE5byoCOLarWkCwwo8dSrqd482bg=; b=excJreVl8ZwX foFU9XZ3H6EU4M64T2fRivx2EmHQAQDgIfalT45jdnsFmQaT4XCrqVP9CZ2/e+lC5BqfpYSI7EVVh e++QTXq+bac3sMSbNS0HgOT/NIkkXfkp73aDF24QtNOo/chxVYBjXuHjzXDGTR0wVz8gwB7pB/L8k Kn+FQB75o71Y4AciC1Vibbu4TBvYnGEwYBmiHQwRNzzqAL3ztRY7f01+JCZkFme6s+eEmjtOppVlF HthSbYlpN9ocC64m0OuBuiuZhDZPNdwoj/0vJagI68osouA5+SxO2PoaHGl7Xmk+gQLE/tDs2c4lR U7IZybi5pA5zPULqUO8wSw==; In-Reply-To: (message from Yang Yingchao on Mon, 29 Apr 2024 20:27:52 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284730 Archived-At: > From: Yang Yingchao > Cc: Eli Zaretskii , 70352@debbugs.gnu.org > Date: Mon, 29 Apr 2024 20:27:52 +0800 > > On Mon, Apr 29 2024, Po Lu wrote: > > > Yang Yingchao 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. Should we now close this bug report, or is there anything else left to do here?