From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: <40697.0454541565$1715373417@news.gmane.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> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27786"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: yang.yingchao@qq.com, luangruo@yahoo.com, eliz@gnu.org To: 70352@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 10 22:36:47 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 1s5Wz0-0006ym-0n for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 May 2024 22:36:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5WyN-0004mZ-2u; Fri, 10 May 2024 16:36:07 -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 1s5WyJ-0004mC-Ua for bug-gnu-emacs@gnu.org; Fri, 10 May 2024 16:36:03 -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 1s5WyJ-0007Cm-Mb for bug-gnu-emacs@gnu.org; Fri, 10 May 2024 16:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5WyI-00028s-E9 for bug-gnu-emacs@gnu.org; Fri, 10 May 2024 16:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2024 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70352 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Yang Yingchao , Po Lu , Eli Zaretskii , 70352@debbugs.gnu.org Original-Received: via spool by 70352-submit@debbugs.gnu.org id=B70352.17153733348213 (code B ref 70352); Fri, 10 May 2024 20:36:02 +0000 Original-Received: (at 70352) by debbugs.gnu.org; 10 May 2024 20:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:43994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Wxp-00028P-Tf for submit@debbugs.gnu.org; Fri, 10 May 2024 16:35:34 -0400 Original-Received: from thaodan.de ([185.216.177.71]:48472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Wxn-00028J-Uv for 70352@debbugs.gnu.org; Fri, 10 May 2024 16:35:32 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 65CFED00022; Fri, 10 May 2024 23:34:56 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1715373296; bh=PNl+lq+IYuqFgyPmhF1w69LbpS7/Ew3O1OEm0vDPQ3A=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=io71AuG4WBnlEW/Z9b3gjIqg8L/egBQz8sacbebc/tNFslt/7EucOKxbYigL14wc1 p4tO+mIMrX6t9KlqT9PKr180c+XQjXaOYgRC5eQSz4psEc+m8kZ7VShqfaR1zI1Ywr U0TWHDPFXbI0sVXVRczUYYCmOtSSPo4wamfpnNCMQdlsh1IiTRk8EcPVYAeoqTZfT8 RSGaZjaSdF4Emjzw/t8Cza11Bn31aNEGXxvGfcoDHBJW2nLUJongqYd2ht4gqWAQVo Uki1yGVNXaX6sueDM9adnescHrvP9C6e+IC4bMEKC/btz8Jt3C1TcBcZBAioz49L/J 6kJI/QyBbORUgXvTz6Pn53EaVYbEdIaZjxsmj9bz6BiQqh7g5lCOp3pJmdh1HxodL5 0m8P+KzfhEiIdXNRlIfVNcV7xRoaX2Df3i1k/sc7hb8Fx9qpmm3p2dAKzoWv5brdva tZJ6Dzv6Su6+zSWoFKZTpV+jwZ2v1lycP99A/GvFd/znFAmmURKtcavfs+fYgPvrNz Gjv9KEI0fM0cy92hAQgwJcebF3iKKxw5QNWQL3KgGoMgK3DdEDolcx7gFoh4UEBXfu sddwpHZQKUP+gNLVp+WUyyZT7xtq2L9ZFuK2i6HolrO4knoetm0mFHAsYjtOA2aR0I GPpcIw4xxP/zozPyTV/z5jNM= In-Reply-To: <87wmogcrxc.fsf@yahoo.com> (Po Lu via's message of "Mon, 29 Apr 2024 19:46:39 +0800") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH 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:284835 Archived-At: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > 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? > >> ,---- >> | 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.