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#73838: 31.0.50; Problems in note_mouse_highlight if -nw Date: Thu, 17 Oct 2024 07:06:33 +0300 Message-ID: <86iktrpe46.fsf@gnu.org> References: <86r08goy76.fsf@gnu.org> <86msj3q4t0.fsf@gnu.org> 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="34710"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73838@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 Thu Oct 17 06:10:09 2024 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 1t1Hpx-0008rB-9u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Oct 2024 06:10:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1HpZ-0004a2-72; Thu, 17 Oct 2024 00:09:45 -0400 Original-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 ) id 1t1HpW-0004Zr-Vp for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 00:09:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1HpW-0001no-N4 for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 00:09:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=wXn3B67dy+4wxVoFXUtz8WVO0df8CJLXGA2mkNJehms=; b=e0DtC8+xh/Rsp1XVt1hyHM4x//ooy1KgPiAJiRantkn9ncNsvPVqV8t9tfcy2LeLtBe7hnOdKDzMbSRdPJ/sQVyyEH3kyty7tTpU1Xj2QmgxuVRgNfdRzCXozm8kBbtcdHRsXhGKHhoSUgYz7Bdjc8I49OM3x4NTsaEtcMvkQdoWqxoAScIuBRRZ9Dt3TnlMAWvWZYUi2izmDjV+of4ryW+qoYm4pfLoF/If9rWMHfuVt4/Vctyx3OabQdkrYqI7VUXi+HrxsMwknaF3cxqimkpJX+XRtoqy8YQ5nDfp84/RslooBQK2juCP7YZOtM3R3QKr32d9calT4rLW5UBCHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1Hpq-0007le-32 for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 00:10: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: Thu, 17 Oct 2024 04:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73838 X-GNU-PR-Package: emacs Original-Received: via spool by 73838-submit@debbugs.gnu.org id=B73838.172913815729788 (code B ref 73838); Thu, 17 Oct 2024 04:10:02 +0000 Original-Received: (at 73838) by debbugs.gnu.org; 17 Oct 2024 04:09:17 +0000 Original-Received: from localhost ([127.0.0.1]:32923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1Hp7-0007kN-C8 for submit@debbugs.gnu.org; Thu, 17 Oct 2024 00:09:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1Hp4-0007k7-MJ for 73838@debbugs.gnu.org; Thu, 17 Oct 2024 00:09:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1HmY-0001g2-Kt; Thu, 17 Oct 2024 00:06:38 -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=wXn3B67dy+4wxVoFXUtz8WVO0df8CJLXGA2mkNJehms=; b=HXsgEhE2l4NzQQGjOF4r hF3EoHXnXz7AXinNkXzgnfJc+YS+Jqh19CDOmQrY5u+A5PG0zH9UDwOeeZyouC12IGNwlhyfViyeT pLIO0HTPqV4xsTUuKJHh0UwbDHHexlrKCpzZgWIxHAr+jhV53etjEAXu3/88dGw8ZSTA+A3WqHWrB 3FGSXfBQ8BBf6f9XveR0fAdi1YsxbKbY9igmkW9PsGIp8AMNvUoDSciohpxPHsatVq1sHmdKuMpR0 cvYmp4snNi6ggATZanIWAMYCXrXyrskjC2W7IHD4YnFYxdQDhmxpDG9r/9C97pqi4DZb9OF5u9VSw 9hh5MR5UP72ogA==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Wed, 16 Oct 2024 21:03:15 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293699 Archived-At: > From: Gerd Möllmann > Cc: 73838@debbugs.gnu.org > Date: Wed, 16 Oct 2024 21:03:15 +0200 > > > Thus, IMO your suggestion is in a sense a step back, because it > > assumes that TTY frames can never have these decorations and can never > > have different cursor types. So my suggestion would be to do the > > opposite: understand why FRAME_OUTPUT_DATA segfaults when dereferenced > > on TTY frames, and fix that so that it doesn't. > > But the current situation is that we follow from the presence of an > internal border that it's a window system frame. We're using > FRAME_OUTPUT_DATA. If that would segv it would be a good thing. It > doesn't do that, it just silently accesses some unrelated memory (in my > case this is equivalent to casting the actual output_data contents to > (struct ns_output *) regardless of what it actually is. > > I've just dragged the FRAME_WINDOW_P out of this stuff because the > whole if-statement is concerned with cursor = ... using FRAME_OUTPUT_DATA. My suggestion is to extend 'struct tty_display_info' so that FRAME_OUTPUT_DATA on TTY frames will not access unrelated memory, when these macros/inline functions are called. Alternatively, we could have the macros/functions (FRAME_INTERNAL_BORDER etc.) test for TTY frame and DTRT.