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#55870: GNU Emacs 26.3, Select All(C-x h) does not work Date: Sun, 17 Jul 2022 19:57:20 +0800 Message-ID: <87tu7gdk9r.fsf@yahoo.com> References: <2278e9bf-89e3-560d-52fc-f26a45aee36c@anche.no> <87mteku1q1.fsf@gnus.org> <87edyrykuf.fsf@gnus.org> <92253b43-50a1-554e-de66-f31f0c423b1f@anche.no> <875yk2sf82.fsf@gnus.org> <83edypw852.fsf@gnu.org> <6e8af953-d207-9912-dc12-254c88470e42@anche.no> <87cze8au6a.fsf@gnus.org> <1d401848-ecec-8233-9aa6-61e52253bc86@anche.no> <83ilo0t32m.fsf@gnu.org> <5d6164aa-42e2-8eda-f935-1b84dec835ec@anche.no> <83k08esf3v.fsf@gnu.org> <7349b51e-6d0b-94b1-d3fb-540d3c2256b5@anche.no> <837d4dsjm8.fsf@gnu.org> <697ffdfe-3827-dcc9-92d2-cf918a19e871@anche.no> <83a698qm67.fsf@gnu.org> <87wnccfbcf.fsf@yahoo.com> <837d4cqiqs.fsf@gnu.org> <87k08cf7wu.fsf@yahoo.com> <834jzgqcfj.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="13195"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 55870@debbugs.gnu.org, larsi@gnus.org, brucelam1982pi@anche.no To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 17 13:58:09 2022 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 1oD2uX-0003FT-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 13:58:09 +0200 Original-Received: from localhost ([::1]:42780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD2uV-000607-TC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 07:58:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD2uQ-0005zz-56 for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 07:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD2uP-0007Hl-S6 for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 07:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oD2uP-0005LY-MC for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 07:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jul 2022 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55870-submit@debbugs.gnu.org id=B55870.165805906020524 (code B ref 55870); Sun, 17 Jul 2022 11:58:01 +0000 Original-Received: (at 55870) by debbugs.gnu.org; 17 Jul 2022 11:57:40 +0000 Original-Received: from localhost ([127.0.0.1]:46824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD2u4-0005Ky-IN for submit@debbugs.gnu.org; Sun, 17 Jul 2022 07:57:40 -0400 Original-Received: from sonic317-34.consmr.mail.ne1.yahoo.com ([66.163.184.45]:37020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD2u1-0005Ki-OJ for 55870@debbugs.gnu.org; Sun, 17 Jul 2022 07:57:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658059050; bh=a4yN25WCdi9jbqassdAMDIpILc8Sv/TwDhLUYPrdb5c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=HlPCW/fyqRPMe4BGpm9BrSOqdtJtj6f5xWCPyvRtUL54wMZoh2/7767BES1EMi8kvzdXjEVDMJMIXOzrdusFf0+gL1hIzwW9e3acv18yHy+KruoiTfS/Fo3gWrXREO2HjRuxfsjTp/Y2pOypGZFVwq627yHjp3RC3n6VOwGTHLAaZN/f/3vU7DYF1ItPs6P237qU/eg6W8PU7NEoIyStIns+qtYKY+PwAt7W6u2gAQWnB11DUXw3gJMOHqk0qbKGt14HdhOlybJfQt3CyldPMstmH//PrylVrvfuepAB8LRCx+5kzUD0Q9cD9ekAEzg75eFBVwek3xQyjqkYsOY1RA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658059050; bh=roVahhQ+2H1mGd5gz7aNGkYhHRQsUENsqAFlLbx5ZFn=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=VJst4uT+jt/JSbViQxzKnt0qhpqav9fIJFMAApUJYIKaUYnD6HZPnzaX9muPaTSrqUE/GbGQNuW3VBvq5iu0br90haZ4vMHcYJL8AcF55DOpPtKmyuBamNbm3S8GSWSk/iPNL5j0RO+iq+tv16HeKRJoVZHN7iYbte6U+nWRkir5OtFLzmjS0iQKCLjEHwJYnw+UwVZYR0WY2GjI7x2W4g4HSyX/Viuu2avgy6STGccHPlw8CpWXWCNNlD9YD/2pJrgDwH2mNrJgVDH+C4C4YRHhDQQkkrYxL2fJts34/a051rYtElmuapaZUhfq7qFvzXbehWkomUzZaN5/84BLOw== X-YMail-OSG: hOllDigVM1msj8vIug5XCL6LOFrjRdxO5zbsG1H0rfC.Ul_q1RuPPBv0tXgxQ7a ErdhtPCcrOR5zHtA77fKnSwq0ol1k4bW9t9qeVRe392juuR8zgKRsadgXxNcKRnWe0cWOW1GtxeE vPvX0VibVMXdje_lcVwhQj4qN9uJQMlBizcQqp2mwC_jsXX6PWRwyXUuRoBp9pO_aaBSuq4LuH2. MdZIniDhrURbHhG7J4jlZJXt.8rvvTqx8i.Bd4syLsd2F8y9rIJTNCTMbbGsF23BDyvDUUrBdm_4 IQyAKGSbyC7T9IIGfp4iFMuYxVsBLykiD6C0QsU_df21.Y8YxOy6hkJ9CuqDA8fYXBbqtDL_aHUz 0t37IaUlVC5VuXK.0pHhrQidSnI9SZtRHY.eWCOm2ZfTARvs02XLD8cK2W4w8HoLwmK5cZYue26B jakeKO_2JRdjACgoELS4ejI8IKWWw7X5kY1Fd6eGKZbKEhqFjGyr.Lz_gHUf4XlAs0bdEozlHl48 u29mGKZTYEzsJKknC0LrdnNSlqPsoB1m3z4xcGSBq7Kv1IDCEhQNPaoxBadP02By.Yg5DBxufXNk hjehr3a.yU5AR_n7sgfWvfBwO7to3bv6D5fVK8UwHkMSo5QkNQjRtC.wzmVRziJqoYrrPSx90xnK 7WJcddtrMO6Ge0P2NrEN447q1QL0UNz_Er9Jd8wRqSw57Be2YzPl.CHu3jLpWClqUEQ2kkP0fA5g J.Em0sTKwssmRI2ogo9FrQCQvB8xEafRgAMNHdhPX7NGk31S1BShYVzr2.rdDLKR1ynfPzbNveEh SakMk6wN61dEvC4xAoeAQBeeExCOb6GrAYEneKlL.l X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sun, 17 Jul 2022 11:57:30 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-zlmw9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 919bb66f101b6e96e5ef596a0a8a5911; Sun, 17 Jul 2022 11:57:26 +0000 (UTC) In-Reply-To: <834jzgqcfj.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Jul 2022 13:08:16 +0300") X-Mailer: WebService/1.1.20407 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" Xref: news.gmane.io gmane.emacs.bugs:237258 Archived-At: Eli Zaretskii writes: > So the growing memory can only be explained by the consing of > selection_value onto terminal->Vselection_alist, where selection_value > is the text being copied by M-w? The previous value of the selection will also be removed from terminal->Vselection_alist, so it shouldn't cause memory usage to constantly increase. > Can any of the potential requests in this situation allocate lots of > memory? Yes. The string is copied each time another program requests the selection, and we have to allocate a buffer the size of the encoded X property data each time we want to send it to another client. But unfortunately I can't see any obvious memory leak here. The reporter should build with TRACE_SELECTION and send some of the output, which could reveal, for example, bugs in the other program (possibly a clipboard manager, since clipboard managers are a known problematic area in the X world) that the code in xselect.c doesn't already take into account.