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#56095: 29.0.50; nsterm.m, use after free Date: Mon, 20 Jun 2022 18:21:51 +0800 Message-ID: <87bkunocsg.fsf@yahoo.com> References: <87r13kw2lj.fsf@yahoo.com> <1e49efb3-c70d-4c58-82a3-50cca5298858@Spark> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35703"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 56095@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 Mon Jun 20 12:30:52 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 1o3EgF-00096L-Kn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Jun 2022 12:30:51 +0200 Original-Received: from localhost ([::1]:44862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3EgD-0000lp-50 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Jun 2022 06:30:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3EYg-0006vj-Fv for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2022 06:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3EYg-0008A0-7s for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2022 06:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3EYg-0003p8-4M for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2022 06:23: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, 20 Jun 2022 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56095 X-GNU-PR-Package: emacs Original-Received: via spool by 56095-submit@debbugs.gnu.org id=B56095.165572052614618 (code B ref 56095); Mon, 20 Jun 2022 10:23:02 +0000 Original-Received: (at 56095) by debbugs.gnu.org; 20 Jun 2022 10:22:06 +0000 Original-Received: from localhost ([127.0.0.1]:54454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3EXm-0003nh-AR for submit@debbugs.gnu.org; Mon, 20 Jun 2022 06:22:06 -0400 Original-Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]:38802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3EXk-0003nD-RW for 56095@debbugs.gnu.org; Mon, 20 Jun 2022 06:22:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1655720519; bh=+b9ahXu+pYYl0WLwynwErqF+W7ia8w3/P19idOblxp4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=eprLwpxyOUm6jKR5wvHA70EwEODzHg9BPuQnYL/5+gfGUvTBUfHDy3KkmYqURuD/wl1dhcOhjrUlqWm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Wz5TjMFDh88ajwAKRgmRArAxvUtcig294MQNuwLALiS_Vdq2KKYcxC6RPSLr6DKORrh 8sFwvayRUF3tkk62mf58tif1zqevWYuo2Iw815Pfh5OmFMbQK_GZiwzhbZk03IeYIuZamkJzbjFk 1KhTd.MmTt7PleRj0s0_LtLJb0yniIG2krMNHj0OAtuyTJfOINzj.jStxAkNQbXY3OiAIqt28.R4 XTGY2ctSVbcSLzWnKL62Mq2Vu11cddN2oe9Sc4n0waxSmYkEbb47ieZ.8MCyAmifVi3nqXY4MINz MBKawDZikS60CJ2xAUxe7y3C55NG3P4YCuG0Cqu88uQ79yk.4XHphp_mYQvlicTceNE.K7Rhbe.M _ZRhx879DTLh09zmx6bBEgoejgHLEkm8ZhlTJYTdkYibZoe2ASjV3j7M4ntQhAo50FPPHHcB55tK yWhrOPXQGYOFiyzMIx7yyb4NRBvt8lWsCiJHpLkZL8_uFcXyKR371en_wNayDrzJ7B3tHCRWT3IO Hs5aNE7KttNbmOySq7DWwnS7OsdUpwbteiZQX1z2Vw X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 20 Jun 2022 10:21:59 +0000 Original-Received: by hermes--canary-production-sg3-559fcd5995-8w55k (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fa4505f3b05b359f71a9bf9e4de4eea2; Mon, 20 Jun 2022 10:21:55 +0000 (UTC) In-Reply-To: <1e49efb3-c70d-4c58-82a3-50cca5298858@Spark> ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Mon, 20 Jun 2022 08:02:48 +0200") X-Mailer: WebService/1.1.20280 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:234864 Archived-At: Gerd M=C3=B6llmann writes: > I'd say no: Ns_judge_scroll_bars is called for a frame, and loops over > EmascScroller subviews of that frame. I don't see how it is could be > certain that all EmascScrollers reference a live Emacs window at that > point. I see. Still, the window should always be reachable through the struct scroll_bar, which is scanned by GC and ought to be alive as long as the EmacsScroller is. But it seems there is no struct scroll_bar at all in the NS port! (Why does it always have to do things differently?) Does anyone want me to fix that? In the meantime, a loop through all the scroll bars in a mark_nsterm function would suffice.