From unknown Wed Sep 10 00:13:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#71693: 30.0.50, SIGSEGV in FRAME_TTY (sf) in redisplay_internal Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jun 2024 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71693 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Clemente Cc: 71693@debbugs.gnu.org Received: via spool by 71693-submit@debbugs.gnu.org id=B71693.17189871012241 (code B ref 71693); Fri, 21 Jun 2024 16:25:02 +0000 Received: (at 71693) by debbugs.gnu.org; 21 Jun 2024 16:25:01 +0000 Received: from localhost ([127.0.0.1]:43123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKh4O-0000Zu-SF for submit@debbugs.gnu.org; Fri, 21 Jun 2024 12:25:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKh4N-0000ZY-KL for 71693@debbugs.gnu.org; Fri, 21 Jun 2024 12:24:59 -0400 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 1sKf5f-00030R-GN; Fri, 21 Jun 2024 10:18:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HMcQ2O+cvH56ojaL7KhevMvnzR3uJNRHmBEbEytlb5E=; b=ivw8meiI8DoQ ZfTsVdJYcn9Ljhn0ZVzSqrzY4FK0rirtxxSS/9ykkiM5esZ1Pa/X2FSPzZfGYYO34if/PdpBjIKdf Wx2t+fSk0xv0YaB8K9ZV0IIFGxFoBDr8xmugs0g9vuxFSh9JIlGgmoS1bn+7Ms/KwhY2J9VCq4QUZ slmh3APqIj5lp6B73kBteRJRAXOB4He20oCnemxUWMYeMCZ8hj0IHVhqAW6Ba7K8pPVLfTWUbKPl2 4mE9G/01iIqC35nA3nHcWK+qiOCvdfRz9F27ZdSTxjyqucUHNX18yjy3hbQ6zKDdmX1Iqjq8NzoMd 62bE+dVcGV+rUJ2Ti/2OSA==; Date: Fri, 21 Jun 2024 17:18:07 +0300 Message-Id: <865xu2l6qo.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Daniel Clemente on Fri, 21 Jun 2024 10:46:58 +0000) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Clemente > Date: Fri, 21 Jun 2024 10:46:58 +0000 > > I enabled -fsanitize. I'm using an X terminal to run TTY Emacs inside. > I opened the daemon inside gdb with emacs --fg-daemon -Q Did you follow the advice and notes in etc/DEBUG regarding runn ing Emacs compiled with this option? > [Detaching after fork from child process 5364] > xdisp.c:16932:10: runtime error: member access within null pointer of > type 'struct terminal' > > Program received signal SIGSEGV, Segmentation fault. > 0x0000555556610d93 in redisplay_internal () at xdisp.c:16932 > 16932 && FRAME_TTY (sf)->previous_frame != sf) If the claim is that sf->terminal is a NULL pointer, then how come we don't segfault when running a build without -fsanitize? From unknown Wed Sep 10 00:13:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#71693: 30.0.50, SIGSEGV in FRAME_TTY (sf) in redisplay_internal Resent-From: Daniel Clemente Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2024 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71693 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 71693@debbugs.gnu.org Received: via spool by 71693-submit@debbugs.gnu.org id=B71693.17194086381338 (code B ref 71693); Wed, 26 Jun 2024 13:31:02 +0000 Received: (at 71693) by debbugs.gnu.org; 26 Jun 2024 13:30:38 +0000 Received: from localhost ([127.0.0.1]:38810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMSjN-0000LV-LF for submit@debbugs.gnu.org; Wed, 26 Jun 2024 09:30:37 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:57809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMSjL-0000L6-JU for 71693@debbugs.gnu.org; Wed, 26 Jun 2024 09:30:36 -0400 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-57d07f07a27so332376a12.3 for <71693@debbugs.gnu.org>; Wed, 26 Jun 2024 06:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719408567; x=1720013367; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RhhbVLmlH2FYMHeLVMzKDCr5yK2YTMkRnEvm3lYUbqs=; b=MbkoeT2aYmlQQjp0NayUEnOcOoDqZl0dGaMtXFIYcS4VF44eHolwFKhHduSjBUTseK r3yHKdIWcX6hEApnR65V5fPeNWBufrtu+WifdJew0OVHKvHHQAyCAKiKtoK6BeW3q6Ow BvzxGmnlpRld+PciJojKxsZs6habXzrZzOCUO9pP7JfFCtIncz09fjQKvI+gwiXvhUT6 fXYcLqYAvRCJMKcAyIGWLOgu+w5/4/ZSQX9cw94zqTkShLSY47Ru+z6/kl/jdORb8SMM qGT0FeYeKPpJZQzpDRk+C2+z8IY5vWvQhIZ4L8AzAYUZfqfhWbInE1NiDbFgOy5t/NPq Vovg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719408567; x=1720013367; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RhhbVLmlH2FYMHeLVMzKDCr5yK2YTMkRnEvm3lYUbqs=; b=FokZfu3gAnjjhXE3P0dIs5bRgkHvJtaDMK7ZVe3eEquUOAGYB88zukaC5alM80u7xv /yAr7UHmFVA02UPdLemSInWvkOBhu3ADaFAp89xWhkRG4+3KoPxFlzMMwz545/g8neYg 9IRkdQKnFLhR54dtaa1Wsw4Hzs+y/1jHWZfxExCgNbUvNYmD6wb9Z3HGvvoCcipsq8Fh xZRgu2fwsRF6V69QZASA5H3taDug0XJXZNwHnZIHwHd0J3PmWU/vdyTCZx/sDVgzUNN4 3w8qTGHaTiypmwSWMfybDjPC+SIoypIFFg9lI29KNmg/epm26VD/ZBL3NZ8Ds+l/Ms+7 EQjw== X-Gm-Message-State: AOJu0YzKv/Dk8WXRv9OWRQ/+DklFhvoMiYPBMxej9sN0dQyTuoYxpHJa xH/k0YdTRDmFX8wuth/T6JTlGdzUQ9YhqZ7JnyEZ3bsYhUNpiXdyHXw2gt5Il7pQVmFjIuF8MJA ONqMd7nOsYcJQZkf2d03SLoQGJvk= X-Google-Smtp-Source: AGHT+IHYtLMk7QmjFi/2x5ph6N0P2cG1weMPka/7fC/syH50Dal9Bwwdr9RnW5uHodaE9x1zsr07Z36DxkLKCDXaXUY= X-Received: by 2002:a50:c054:0:b0:57d:669:cafb with SMTP id 4fb4d7f45d1cf-57d70075c73mr4755503a12.40.1719408567282; Wed, 26 Jun 2024 06:29:27 -0700 (PDT) MIME-Version: 1.0 References: <865xu2l6qo.fsf@gnu.org> In-Reply-To: <865xu2l6qo.fsf@gnu.org> From: Daniel Clemente Date: Wed, 26 Jun 2024 13:28:58 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > > > > I enabled -fsanitize. I'm using an X terminal to run TTY Emacs inside. > > I opened the daemon inside gdb with emacs --fg-daemon -Q > > Did you follow the advice and notes in etc/DEBUG regarding runn ing > Emacs compiled with this option? I missed some things. For instance I used this: -fsanitize=3Dundefined,address,bounds-strict,float-cast-overflow '' But I didn't notice this: Address sanitization is incompatible with undefined-behavior sanitization, unfortunately If you want me to enable just one for next reports, please tell me which one. For now I think I'll disable the whole -fsanitize, because of the false positives. > > > [Detaching after fork from child process 5364] > > xdisp.c:16932:10: runtime error: member access within null pointer of > > type 'struct terminal' > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x0000555556610d93 in redisplay_internal () at xdisp.c:16932 > > 16932 && FRAME_TTY (sf)->previous_frame !=3D sf) > > If the claim is that sf->terminal is a NULL pointer, then how come we > don't segfault when running a build without -fsanitize? Even with -fsanitize, it didn't crash each time, just this particular time. I have seen similar crashes in redisplay code even without -fsanitize, but none at this particular line and none doing something as simple as opening and closing 3 frames. I also thought that maybe I had enabled so many debug options (-O0, -fsanitize, =E2=80=A6) that my emacs become slower and therefore more prone= to errors that depend on timing, like things happening at specific points of the frame opening and closing code. But this report may be bogus and you may close it if it seems so. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 28 21:00:25 2025 Received: (at control) by debbugs.gnu.org; 1 Mar 2025 02:00:25 +0000 Received: from localhost ([127.0.0.1]:55844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toC9R-0007b6-CB for submit@debbugs.gnu.org; Fri, 28 Feb 2025 21:00:25 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:53477) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1toC9P-000791-5J for control@debbugs.gnu.org; Fri, 28 Feb 2025 21:00:23 -0500 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5deb956aa5eso3953673a12.2 for ; Fri, 28 Feb 2025 18:00:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740794417; x=1741399217; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=RCMUzHsdlD7bi0MyFyjnXelbl2AfQ4FcEjYTAFamcgo=; b=KY52GEuCuE4nz6Wm2Da1DI+eC8L5q+Vs5AspJflkosd+BKpoyKMK+AWU7YnHY4QqYd R9qHYMTwixsIx9uKwMi/VJrn1kyc7YvznFlMp6SRHhpHVc2gyUlEtL7SEDgOpnhQNDi2 QZB9v2qUI4mhmwuzOdkU4CD+3cebogOojBWCrxS30NZU9sZ6OsfE6mw0PupP46qH5uWM SRuWHd3Uij1ZAheF3UOKg4e47JkfDQKQdFvHhj7qLbxV8emVUS/j5aSwb2Fuxoo7cL+6 5bw1rozXFS6f1Eu/PjAE5A9ySbJbBl0F9lHhfqw5lD2VLo+iZqWqELQJJ/jCdZ6RTR1H sqDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740794417; x=1741399217; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RCMUzHsdlD7bi0MyFyjnXelbl2AfQ4FcEjYTAFamcgo=; b=M0RU9RQVvY2XiFHgQi2/UKy41pMuAwCvkns7e6WX5rMK+EwaC5hW3nhn3MKSPMDQjv vkfYJxzFhnWKE2ShTWWOBUX0jx0keeUtVcZDDTxtVmj+MaQWYNMz+CWMbALD+zWwn1HH T9MYLI/OfxNwVe+9x9r62xhgY8TeHItvXQZgAm9kNjoIvcK9woJ8GBSO0lV3zWOnFzT0 yb/rPaIkKMBltlL9cFoIoblqSu4fXpZlg8d/JfpNG19LN+Q2zZaHpybnNFS4evHF0saD l+dz1mIScMO+OZ4i8cvhX+Cf0eDZc+gorxoMawqBZEetMK0nh2EPVhg1b//E/cIzI9hH FUrQ== X-Gm-Message-State: AOJu0Yz3UK3oBX4fhKqqavmbtfc7ZawlmiArzIr7vXqOLQoNYWWvZsTD /Rv0RK5UGL8pa2i6KpZxFpymYa/Kqsz13w5ZqW457Lbi+yqeehsq204AEOBYkzrrWLjCOJeoRU7 /RCKbA6DmhK69JMmstPMDZ9MTEkr/TB/Z1K0= X-Gm-Gg: ASbGncsWyR0wXW7/ExmnQooQJMoW5Thfx3T64bL3xAkFci2ZUEEsKKOCVhhC5Nbxo49 HHI+qpSv6gqT1wxafQkYqe9dizMq/AdM1WfCtJhaAmM25Sb12NENaWn2P95LghRODs2UJ7T/jmw NfxThGL5SgOO51l8QC1G9O3D15se0= X-Google-Smtp-Source: AGHT+IGyOqhbSjTzwVj168VJcYUhyNt+0leSIFPffIlEYbEOTTFOTdnD58L/V/4PJx742XyDaEbEBZ8Ghpwa2yPiwXY= X-Received: by 2002:a05:6402:3548:b0:5dc:7374:261d with SMTP id 4fb4d7f45d1cf-5e4d6ac4b81mr11610022a12.7.1740794417027; Fri, 28 Feb 2025 18:00:17 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 28 Feb 2025 18:00:16 -0800 From: Stefan Kangas MIME-Version: 1.0 Date: Fri, 28 Feb 2025 18:00:16 -0800 X-Gm-Features: AQ5f1JrIcOne0mBQ4o7gxtxJeQRaQdTg1Srbj6QiyV2hZPP4env4ZS9yX8knP6g Message-ID: Subject: control message for bug #71693 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 71694 71693 quit