Received: (at 65193) by debbugs.gnu.org; 10 Aug 2023 09:21:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 05:21:30 2023 Received: from localhost ([127.0.0.1]:41392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qU1rG-0006LA-2D for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 05:21:30 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:57782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mituharu@HIDDEN>) id 1qU1rE-0006Ky-22 for 65193 <at> debbugs.gnu.org; Thu, 10 Aug 2023 05:21:28 -0400 Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 16DFDF08F8; Thu, 10 Aug 2023 18:21:26 +0900 (JST) (envelope-from mituharu@HIDDEN) Date: Thu, 10 Aug 2023 18:21:26 +0900 Message-ID: <wlttt7ntgp.wl-mituharu@HIDDEN> From: YAMAMOTO Mitsuharu <mituharu@HIDDEN> To: Po Lu <luangruo@HIDDEN> Subject: Re: bug#65193: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook. In-Reply-To: <87pm3vs3qf.fsf@HIDDEN> References: <wl7cq3mjj7.wl-mituharu@HIDDEN> <87pm3vs3qf.fsf@HIDDEN> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65193 Cc: 65193 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Thu, 10 Aug 2023 17:26:00 +0900, Po Lu wrote: > > YAMAMOTO Mitsuharu <mituharu@HIDDEN> writes: > > > SET_FRAME_ICONIFIED has a call to gui_consider_frame_title and it can > > cause Lisp evaluation if icon-title-format or frame-title-format > > contains (:eval FORM). This is problematic because > > SET_FRAME_ICONIFIED can be called inside read_socket_hook. > > > > The call to gui_consider_frame_title was introduced by the following > > change: > > What practical problems have resulted from this change? To my understanding, the Lisp evaluator is not reentrant, and thus Lisp evaluation inside read_socket_hook, which can be called from fairly arbitrary places via unblock_input/maybe_quit, causes hard-to-reproduce, spontaneous crashes. > There are already several situations under which Lisp can be called > inside read_socket_hook. That's really surprising. I've once heard we shouldn't do that. Is that changed? > And in principle, anything that performs GC can in turn call > finalizers that subsequently run Lisp. My understanding is that GC can only be triggered by eval_sub or Ffuncall calls (except explicit garbage_collect calls), but not by Lisp object allocations, for example. Avoiding Lisp evaluation inside read_socket_hook also means avoiding GC inside read_socket_hook. YAMAMOTO Mitsuharu mituharu@HIDDEN
bug-gnu-emacs@HIDDEN
:bug#65193
; Package emacs
.
Full text available.Received: (at 65193) by debbugs.gnu.org; 10 Aug 2023 08:26:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 04:26:16 2023 Received: from localhost ([127.0.0.1]:41306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qU0zn-0004nO-SF for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 04:26:16 -0400 Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]:46612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <luangruo@HIDDEN>) id 1qU0zm-0004nC-5Y for 65193 <at> debbugs.gnu.org; Thu, 10 Aug 2023 04:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691655968; bh=8w1naDVwDeokiW0rkiL8hHdsz2K21vBEDfo1VClZi+Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ALgm9+360uJV+dEqNT++R9wL29ess0PEjZQeC5a3dzxODBVYMW3ZuAKWf6+wJT2FYZEr7I+Dr2jeGzmRB11DHg3w7HaE5a04ru6m3OX5DQVO1umLU9miL5ZwjvcOFHjFPfHtjTtL1CIGW4MOQcFBOcNe2qQu3ajVLxFlPBB/cIpG3AjHsuEQtFsYtatl5Jy2yzHpZb3vYYHaTTZE2bq9+WLsE28hqg19OOP631OkapewkjI0v5Uq3ocBB9OP0ERi+lmRkPgD+xMQ4vyP4+SaexQ0VK+uu3cNtncSPECzCy9jsYCHaRDCDgc6ZxPAi+Ej5zoqwl1YRr/woMm3H1J3oA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691655968; bh=ya2b7keJB/cpFB+nYAKFyqLOtjQhvF/V1INhWaNxXPm=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=bCcqaXeYeW0y9KJxJ5qoLmEnFzT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2WB_tK_matTl5lhGUdbGD5HELqFuZWR78ZdE.mGzyiar9FPLUclv6ChwvP 1ABv02AsbJsxuIX4vh2RKBfJt1Hk7g2foOJMpJ.hsGp1BoTJ1ow_NQFjWCFVsfj3rbESCFrh0.dM QDzvp8ciGms1rCdnp_C7rBLBL.wYa5BGtunja8yq9dza7zMQGIQ9Vxgd7hFBTzBXcXK3guPuOpst ZhGFmVTTxeWuBiHbphNxGg43NzjkMJtV.fI.1DWS8G6c46IXeA4X3hKtTD4g2Kq8FFnWGpZYzExB BG7tQEI9SBdteePB7HNH1PLbj_JqnJ1QVqLD.3SSrpgjN9IHzOJ2U.04ZtQiK1MujQyIxosCrkQl GOGh7usvCqky4j2GCge9G_wBNLMYmTeW5Xy4abrqKJHEyLALyDatKpJPN7P.tYufzSETrabn7_un hD2n2Lwg5jJMXv51CVe3C.puzmvRpqpBl79eIu9p3FtPtYxwXoJ9UvfCPApBWI.QYOPwmC64- X-Sonic-MF: <luangruo@HIDDEN> X-Sonic-ID: 9e8f9d4c-4c60-4f50-a187-12e63bdc8a3f Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Thu, 10 Aug 2023 08:26:08 +0000 Received: by hermes--production-sg3-69654d8bd-752gm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 919a03edb6a322890c7ef7fb7b8ced11; Thu, 10 Aug 2023 08:26:05 +0000 (UTC) From: Po Lu <luangruo@HIDDEN> To: YAMAMOTO Mitsuharu <mituharu@HIDDEN> Subject: Re: bug#65193: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook. In-Reply-To: <wl7cq3mjj7.wl-mituharu@HIDDEN> (YAMAMOTO Mitsuharu's message of "Thu, 10 Aug 2023 16:41:16 +0900") References: <wl7cq3mjj7.wl-mituharu@HIDDEN> Date: Thu, 10 Aug 2023 16:26:00 +0800 Message-ID: <87pm3vs3qf.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 649 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65193 Cc: 65193 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) YAMAMOTO Mitsuharu <mituharu@HIDDEN> writes: > SET_FRAME_ICONIFIED has a call to gui_consider_frame_title and it can > cause Lisp evaluation if icon-title-format or frame-title-format > contains (:eval FORM). This is problematic because > SET_FRAME_ICONIFIED can be called inside read_socket_hook. > > The call to gui_consider_frame_title was introduced by the following > change: What practical problems have resulted from this change? There are already several situations under which Lisp can be called inside read_socket_hook. And in principle, anything that performs GC can in turn call finalizers that subsequently run Lisp.
bug-gnu-emacs@HIDDEN
:bug#65193
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 10 Aug 2023 07:41:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 03:41:31 2023 Received: from localhost ([127.0.0.1]:41225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qU0IV-0003Zs-4f for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 03:41:31 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mituharu@HIDDEN>) id 1qU0IT-0003Zf-11 for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 03:41:29 -0400 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 <mituharu@HIDDEN>) id 1qU0IN-0004zO-Bw for bug-gnu-emacs@HIDDEN; Thu, 10 Aug 2023 03:41:23 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <mituharu@HIDDEN>) id 1qU0IL-0003Hz-DV for bug-gnu-emacs@HIDDEN; Thu, 10 Aug 2023 03:41:23 -0400 Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id C9AE5F08EE for <bug-gnu-emacs@HIDDEN>; Thu, 10 Aug 2023 16:41:16 +0900 (JST) (envelope-from mituharu@HIDDEN) Date: Thu, 10 Aug 2023 16:41:16 +0900 Message-ID: <wl7cq3mjj7.wl-mituharu@HIDDEN> From: YAMAMOTO Mitsuharu <mituharu@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook. User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Received-SPF: pass client-ip=133.82.132.2; envelope-from=mituharu@HIDDEN; helo=mathmail.math.s.chiba-u.ac.jp X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) SET_FRAME_ICONIFIED has a call to gui_consider_frame_title and it can cause Lisp evaluation if icon-title-format or frame-title-format contains (:eval FORM). This is problematic because SET_FRAME_ICONIFIED can be called inside read_socket_hook. The call to gui_consider_frame_title was introduced by the following change: commit e99f41f03a97641ee05ba4a27f8b91c190f55df1 Author: Po Lu <luangruo@HIDDEN> Date: Thu Jun 9 21:48:19 2022 +0800 Fix recalculation of `icon-title-format' after a frame is iconified Previously it would only happen upon the next mode line redisplay, meaning that just pressing C-z would not update the implicit title, since C-z doesn't cause a redisplay. * src/dispextern.h: Update prototypes. * src/frame.h (SET_FRAME_ICONIFIED): De-slugify. Call `gui_consider_frame_title', since `icon-title-format' might be different from the current frame title. * src/xdisp.c (gui_consider_frame_title): Export (also in dispextern.h). (bug#55850) YAMAMOTO Mitsuharu mituharu@HIDDEN
YAMAMOTO Mitsuharu <mituharu@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#65193
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.