From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu 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: Mon, 29 Apr 2024 19:46:39 +0800 Message-ID: <87wmogcrxc.fsf@yahoo.com> 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> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37100"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 70352@debbugs.gnu.org To: Yang Yingchao Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 29 13:48:04 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 1s1PUK-0009QE-Kd for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Apr 2024 13:48:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1PU1-0006u8-Kp; Mon, 29 Apr 2024 07:47:45 -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 1s1PU0-0006tN-Li for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 07:47:44 -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 1s1PTy-00017N-Ra for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 07:47:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1PUI-0001SE-Eu for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 07:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Apr 2024 11:48:02 +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.17143912395550 (code B ref 70352); Mon, 29 Apr 2024 11:48:02 +0000 Original-Received: (at 70352) by debbugs.gnu.org; 29 Apr 2024 11:47:19 +0000 Original-Received: from localhost ([127.0.0.1]:56793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1PTa-0001RS-Nu for submit@debbugs.gnu.org; Mon, 29 Apr 2024 07:47:19 -0400 Original-Received: from sonic304-21.consmr.mail.ne1.yahoo.com ([66.163.191.147]:45527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1PTY-0001RK-3D for 70352@debbugs.gnu.org; Mon, 29 Apr 2024 07:47:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1714391210; bh=rXFGBuq44uueyXxI/6ssmpEYUFUzQYIb2iwtGyuaAj8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Pvuy8+dLp+MY4KveQNqp+51p4E8YzvJv0rWZvHtXzkbBLQcszK2cEz+OgwmiH86y7gL1sGPzoRp+1Xoajsd/654r7dPrGpCTTpkezdH7Ozu+KfV0O0IsVdNvsLwBjsGNlQHsnZpWSWim4vp78CkzZ+1n6mK543xZzah/MamFJ20blI5eZN4UFlBJN+d7T8OrKz1ozpeKrCzSfRmg58N//q4uPGQMEiJvH/MdA2M9ZtzBoS3QJbBd3vPnlfQXao51dnGDW7SlcfVNc/ZOkzm7g8ny/SmMwXP1e332o0NrLg59A+Xxc2nC2FCITdilwHxw37xiTYKEdkfICKCJjtS5MQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1714391210; bh=BSqKsvQvlWt/8MNTEhAkixsithql4yhyBmNJfBK/w/P=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=omqsbTG0o7T6Lzh7FmOTzuxGMby+S9NCYmPEXgBN80Xs859eUM3ZoBW32tdlVThHUcj/NLYdIg3q4xt6Ha97KBHyYumKBhJwezRZCJhu0d+W/w27b2p4B3/1d2zlnnSkJYJRAo3OBaQHGb/Occh6QuLPMErYURMZPeXsB2kA9VOEPinmhjfXkrkb+/Ipen/wSbpJ1f6jKTv10z/3xtl5hcWs8tfgiVlJv/lovk/ftaeFpqjXak3/uZSkwRotTUo7K3TGfo8aignFLA9Cji05rKVlM7aPx72VANql+Rlhq3K69kNl+KWseP0J/QZtzxUwF6opDM38DOOU3Q0ICkwMcw== X-YMail-OSG: iOc7gHwVM1kRtwaW.ApPssNzfzq4cGTerZy3ibzEfGbFeY41WP1FYnuZQ6QAeqE 3Ro.czYKoBCrlScU3544gsZ2.5SmiHHZBBZ2xfh_tEARxO4guCRfQyheEgU0BsgiXIm.uTu8xwvo aLnWzb3AWNbJKH.7r_WO_OWab1O62QVS6VvOoR0jtOFvB7IyeIDM5AzLmv5QQgF3X2jLHFpU49mz EE8yB5bSPmtnbHrzhRDg.etHUpWJ9YSQDTKbsTT9V.HpOs5K9hQmThYHuyCn0Cng.d6xDZ40X00H 1xkMbIjyeRQWigpgcph9.S0KZ3aZZ2hB4pmK2kUcu3sTo6gr9e_cheyCJzIponDCPgsWHHLpptKX 0eRcv7sKFBTVStvOhnmMg6Omrdzg5ScPgSI26JAtj0YFv56oYvr2EdHPG2pUhLIJX_8xryV4eMUh 0fCtspC1qCA2skRbkiVD_ftHC_Eu8UxNtpuSXGbxj3el2WqaHLzd0cH2y37i7WGPlx3qq_cgEmhB cr6TpgT.BJxagleuG1i1ShvFyebvpWfO8TMGHhvxjBaQlA1PO.yvku_LySlxhQyacIMCWLO6g1oj Lj__8pbRG1AYDPpGH4DNDqTkgmddkUhwvV5aR0SFw3XtaPInkCJ.bfjKd1qq5.6goEHK60sYXQBX Ru0K_V84ge_8f9__KkUj.g5plUm.DZ3DB7T5mrUxnRlamPGCJeMlsZ8_Bu1EIs0P2i_LcGZptBGF hqe_Bw8QAMjclQBh14ZxOylSeZR9vcLA2datRFMMaa4Swee36QYUQqVKZGT4NykURiULqsAUePP4 nxFNQ6wWV3KsxqasbQ8g_WehUOsAGJJNuAZvdZT_8_ X-Sonic-MF: X-Sonic-ID: cab3afdb-60ed-4043-9d01-354253b04134 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Mon, 29 Apr 2024 11:46:50 +0000 Original-Received: by hermes--production-sg3-6f9f87bd85-np5nc (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e46db687fb657f0aae86a9d1f88b9915; Mon, 29 Apr 2024 11:46:47 +0000 (UTC) In-Reply-To: (Yang Yingchao's message of "Mon, 29 Apr 2024 16:45:16 +0800") X-Mailer: WebService/1.1.22256 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:284140 Archived-At: 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.