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.devel Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Date: Thu, 05 Sep 2024 16:52:55 +0300 Message-ID: <861q1y437s.fsf@gnu.org> References: <8734mezkgo.fsf@gmail.com> <87plpis6ff.fsf@protonmail.com> <87bk124aip.fsf@gmail.com> <87h6aus5yz.fsf@protonmail.com> <87y1461frv.fsf@gmail.com> <864j6u47g4.fsf@gnu.org> <8634me447j.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="17540"; mail-complaints-to="usenet@ciao.gmane.io" Cc: execvy@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 05 15:53:51 2024 Return-path: Envelope-to: ged-emacs-devel@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 1smCvn-0004Rj-82 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Sep 2024 15:53:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smCuy-0003rO-VX; Thu, 05 Sep 2024 09:53:00 -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 1smCux-0003rC-G1 for emacs-devel@gnu.org; Thu, 05 Sep 2024 09:52:59 -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 1smCux-0004BU-5f; Thu, 05 Sep 2024 09:52:59 -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=+/A9Vvlor/8tMis+sXr8jEf3Okah8G8PhR1gBwN35ME=; b=aUZpL95tK4Xp1SWnmkZL ytzsY6VgfkWmiZYe/+CtZCqrIjyLm/KjxpnJvhho9Z501kM8dM+3WwCMqbD7AaIn9+zElmZG+UoF/ ZdzoyCDJtQY8euOqNnJVZR0O+nJK9JvlQS2fJ3Itt04xlL9rZex0GywXBlYozbqAOWuekm/scO9on VcTrjXhp+UARv1H6Nk9dg/0BWMpN4NaY/oNxo/k/bY1kHfDlFcWTVoEh7i9uzBxuFObKPT5x5mJdw 8gJKlK6KbfFvk9NEz6mnxGly8mnv+/gd65DkaMES28u5utFAT+w0PxMnuNiBAJ3DVQCNcPywWJqTE 0ghNK5Xxi8kXcQ==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Thu, 05 Sep 2024 15:37:38 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323407 Archived-At: > From: Gerd Möllmann > Cc: execvy@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org > Date: Thu, 05 Sep 2024 15:37:38 +0200 > > Eli Zaretskii writes: > > >> Hm, sesms we have to check for FRAME_OUTPUT_DATA being null for window > >> frames. > > > > Why do you think so? Are we sure FRAME_OUTPUT_DATA is NULL in this > > case (as opposed to a pointer that cannot be dereferenced because it > > was moved)? > > I would be 100% sure only if I had it in the debugger :-). > But if you look a bit further down in fix_frame: > > if (FRAME_WINDOW_P (f) && FRAME_OUTPUT_DATA (f)) > { > struct font **font_ptr = &FRAME_FONT (f); > if (*font_ptr) > IGC_FIX12_PVEC (ss, font_ptr); > Lisp_Object *nle = &FRAME_DISPLAY_INFO (f)->name_list_element; > > That means FRAME_OUTPUT_DATA can be null during the lifetime of a > frame. If that happens, we'll crash exactly in that way in the new code > for window frames. We never test for FRAME_OUTPUT_DATA being non-NULL in the code, so I don't think I understand why igc.c is different.