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:19:58 +0300 Message-ID: <83mta7op7l.fsf@gnu.org> References: <87mta8qx48.fsf@yahoo.com> <83v8ownmi1.fsf@gnu.org> <874jwgqbd6.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="23495"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 58334@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 15:07:32 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 1ogn4e-0005yp-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 15:07:32 +0200 Original-Received: from localhost ([::1]:59302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogn4d-0007x6-Cx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 09:07:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oglPa-0005X2-AF for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oglPa-0000mi-1C for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oglPZ-0000fk-QE for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 07:21:01 -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:21:01 +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.16651416092488 (code B ref 58334); Fri, 07 Oct 2022 11:21:01 +0000 Original-Received: (at 58334) by debbugs.gnu.org; 7 Oct 2022 11:20:09 +0000 Original-Received: from localhost ([127.0.0.1]:34513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oglOi-0000dz-WA for submit@debbugs.gnu.org; Fri, 07 Oct 2022 07:20:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oglOh-0000da-H0 for 58334@debbugs.gnu.org; Fri, 07 Oct 2022 07:20:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oglOb-0000LU-PV; Fri, 07 Oct 2022 07:20:02 -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=ECjtVTr+g5XD/OEcqQ2oC4TITEkczlvcXavF7ziQtB4=; b=qJWMS9bOuJuDC37YfpVL zleqcAZNdglce+R6LMqbSciv4DQHEvkzVTXcCtnFuSQRR2jMp/HU9xAqWRsUpZgZ5oH5VLsW3Opas QihixBnyEO0rysrtqaJ2SD4UHw0b08wcruQZ/gexyrLzyKbK1bqFeXGDboKcVscIJTNIfY9nBCzU2 0uSCSaSnHfkS0ts8N6wjWqrE6oSeSzVIdVa+taSLmlNlSMgbH76c+PvdTptL2ZCIitxI42i08HYhX zBoGFsJDeSdWK86bTEkzyOfRcO1KQpwOxlkKtjoc09mdrmaQaX1qn8G+u76b0MmAwpi171gJe/lcV Q6liJa+IkzgfMg==; Original-Received: from [87.69.77.57] (port=4992 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 1oglOa-00029s-Ck; Fri, 07 Oct 2022 07:20:01 -0400 In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 07 Oct 2022 10:54:34 +0200) 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:244761 Archived-At: > From: Gerd Möllmann > Cc: Eli Zaretskii , 58334@debbugs.gnu.org > Date: Fri, 07 Oct 2022 10:54:34 +0200 > > Po Lu writes: > > > Gerd Möllmann writes: > > > >> And, while vaccuming, I also wondered what happens with the glyph > >> matrices, and maybe other global state? > > > > Isn't input blocked wherever the glyph matrices are modified? > > If not, > > Partly. Eli please correct me if this has changed. > > Redisplay has two phases: > > 1. Building desired matrices, that is, what should be on the screen > after redisplay. > > 2. Updating current matrices from desired matrices, and bringing that on > the screen. > > Only phase 2 has input blocked because the current matrices are > modified, which are shared state with the GUI code. I don't see input blocked in phase 2, either. We interrupt phase 2 if input is pending, but even that only in some cases. The GUI code runs in the same thread as phase 2, so there's no reason to synchronize anything here, AFAIU. If you are thinking about expose_frame and friends, then that was changed years ago not to run from the signal handler, so it cannot cause any problems to code that modifies the glyph matrices.