From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: MPS signals and Emacs Date: Sun, 21 Apr 2024 23:44:10 -0700 Organization: UCLA Computer Science Department Message-ID: <71431fc4-2ab2-4778-88df-25d4e315d737@cs.ucla.edu> References: <878r16n5jl.fsf@gmail.com> <87ttjulb16.fsf@gmail.com> <86a5ll7wj9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9324"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 22 08:45:02 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 1rynQE-000296-69 for ged-emacs-devel@m.gmane-mx.org; Mon, 22 Apr 2024 08:45:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rynPY-0001Bo-B0; Mon, 22 Apr 2024 02:44:20 -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 1rynPU-00019o-ML for emacs-devel@gnu.org; Mon, 22 Apr 2024 02:44:16 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rynPR-0005vf-NG; Mon, 22 Apr 2024 02:44:16 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 254A33C011BD8; Sun, 21 Apr 2024 23:44:11 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id dt62EHcCezJE; Sun, 21 Apr 2024 23:44:10 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id C85BD3C00E40A; Sun, 21 Apr 2024 23:44:10 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu C85BD3C00E40A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1713768250; bh=aIhvid6g6bfczZvTr4uwvL8SRhb0BWZ/xkyOG9iCgjI=; h=Message-ID:Date:MIME-Version:To:From; b=MmiBvag0Hfpsq2wbDu44a/yIkqpoxRG1Q1aASXAQHsGHZFALTAUkBw7LtSzqhBUsN yNzK2MUZl3XvjFBWmDxphT7MrGdWOC0S2HkwqawGYrZ4LhGcEk2CMYmFG3PL1NvzgQ g3ouZQQmC1uYHYWNvgh0IT/Hja/ggP9W4YfEndM6GUR4AqcDG3Lk5R4y2ZFkusGceR jmzzKJi47I/Y/kbMLd9Xh6NWUbg5Z18KA97rccV9qVFb4CX4/6PHKAHp0lvRAy/2gZ aIVz4fvIgo2aKPfT7zL9kQIAtF+xw4UliZPEK/LU4Ok16UHYursGiUGdS0RIAz0tG6 x1VKPfb7WfYsg== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id TdKd0g_H7-Or; Sun, 21 Apr 2024 23:44:10 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id AAE1B3C011BD8; Sun, 21 Apr 2024 23:44:10 -0700 (PDT) Content-Language: en-US In-Reply-To: <86a5ll7wj9.fsf@gnu.org> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:317952 Archived-At: On 2024-04-21 23:15, Eli Zaretskii wrote: > Paul, can you please help by suggesting how to handle this situation? I don't know MPS or the MPS branch. However, it sounds like the MPS branch should indeed call init_signals (to let Emacs set up signal handlers the way it likes) before calling ProtSetup (to let MPS override Emacs's handling of SIGBUS and SIGSEGV). Emacs's SIGBUS and SIGSEGV handlers are used only deal with serious internal fatal errors, which should never happen, and if they do happen I hope MPS will do the right thing with them by passing them to Emacs's thread_fatal_action. You should test that by injecting a serious internal fatal error (usage of a bad pointer) into Emacs and seeing that MPS does the right thing with it. I assume that MPS is not being used to allocate any of Emacs's own objects, as copying collectors are incompatible with Emacs's habit of squirreling away pointers inside integers.