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#58334: 29.0.50; ASAN heap use after free in gui_produce_glyphs Date: Fri, 07 Oct 2022 14:34:57 +0300 Message-ID: <83ilkvooim.fsf@gnu.org> References: <87mta8qx48.fsf@yahoo.com> <83v8ownmi1.fsf@gnu.org> <874jwgqbd6.fsf@yahoo.com> <87zge8orla.fsf@yahoo.com> <87r0zjq3s6.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 58334@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 16:11:47 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 1ogo4p-0006Ss-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 16:11:47 +0200 Original-Received: from localhost ([::1]:34580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogo4n-0006yc-Tp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 10:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogle7-00081C-Mr for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogle6-00036d-ED for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogle6-0003EL-8H for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 11:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58334 X-GNU-PR-Package: emacs Original-Received: via spool by 58334-submit@debbugs.gnu.org id=B58334.166514252112361 (code B ref 58334); Fri, 07 Oct 2022 11:36:02 +0000 Original-Received: (at 58334) by debbugs.gnu.org; 7 Oct 2022 11:35:21 +0000 Original-Received: from localhost ([127.0.0.1]:34534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogldQ-0003DJ-Sm for submit@debbugs.gnu.org; Fri, 07 Oct 2022 07:35:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogldO-0003D4-QL for 58334@debbugs.gnu.org; Fri, 07 Oct 2022 07:35:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogldG-0002zX-O5; Fri, 07 Oct 2022 07:35:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=c2q56osyvadmYpm3y93uu2Vh1lVqtmZvx5LkycYieDg=; b=NEKFfhjNPRvBbyPYr46j 2+Mop+BDVSExbDv2H7STRuYVYiqiCJbQA+izmUfmate4tyk5imnYWC8+bagBqFpFLGMIX1Ann9HU3 TxTDSK6/9HjAwHDGhol6ldzmKMtkQnZWYmJoACGvSHlstJIZa5mP8Di27yFPDW6QPxDeBIJjKG8fR QzYCMlzxd/xCX09xdGKC1HFe3xWflnVi9S5T5ZdWmsqJeYm0Gb8VPe3mxoTLR/uCh/wCjGn/aUYqt CNFRnW2Du3Zz96+tngj4y4f4FHG1+s5Wt1syNB9JOFAZaTR9SxiQ7jjMaT48Zh0pc5VtSrSoaj00P uGN4QLQxv1db/w==; Original-Received: from [87.69.77.57] (port=1935 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogld4-00068o-OY; Fri, 07 Oct 2022 07:35:09 -0400 In-Reply-To: <87r0zjq3s6.fsf@yahoo.com> (message from Po Lu on Fri, 07 Oct 2022 19:19:53 +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" Xref: news.gmane.io gmane.emacs.bugs:244774 Archived-At: > From: Po Lu > Cc: Eli Zaretskii , 58334@debbugs.gnu.org > Date: Fri, 07 Oct 2022 19:19:53 +0800 > > Gerd Möllmann writes: > > > So, do you agree that block_input wouldn't solve the problem? Or does > > it? > > It should, because it prevents the read_socket_hook from being called. > However, you must keep in mind that anything that can call unblock_input > can also run redisplay, as unblock_input reads pending async input if > the input is completely unblocked. IMNSHO, we cannot start blocking input left and right, because it will make Emacs unresponsive. I think a better alternative is to audit the uses of FACE_FROM_ID and see what we can do to protect their callers from a situation where the frame's face cache was freed since the face ID was obtained. We could even make the remedy be part of FACE_FROM_ID itself, so it will "self-heal", so to speak.