From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: a random backtrace while toying with gdb Date: Sun, 30 Jun 2024 20:32:54 +0000 Message-ID: References: <87bk3jh8bt.fsf@localhost> <87wmm6rcv1.fsf@gmail.com> <86le2mhhsj.fsf@gnu.org> <875xtqramd.fsf@gmail.com> <86cynyhfsn.fsf@gnu.org> <87v81qp91g.fsf@gmail.com> <86r0cefb0i.fsf@gnu.org> 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="32342"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, gerd.moellmann@gmail.com, yantar92@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 01 04:19:45 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 1sO6ds-0008Co-M1 for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Jul 2024 04:19:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sO6dN-0004cg-CG; Sun, 30 Jun 2024 22:19:14 -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 1sO1EP-0005ps-2q for emacs-devel@gnu.org; Sun, 30 Jun 2024 16:33:05 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sO1EM-0006om-U0 for emacs-devel@gnu.org; Sun, 30 Jun 2024 16:33:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719779579; x=1720038779; bh=G52vp4wx6qw3IC0sfb8lAKmPweuks59C4+UMtqTI254=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TljjdEjo8oKRaMLAFvCDqr2iLeZmD5nFvhvmIgdvHQt0DUiOs5SPlr9mZ0vG2TUJd z9NcXyWo7s45yyJY+uNSCsAZQ9Jn0x3EzHpMF18Ijj5YjcIu5alI/caVzoi37Gog5L 2B6xxxp9SECDkWDUoVjNIenAyCUOqRCkPip8EG1T3oysYC43cCYkdgXXBGv7lgAZwU gLNSQ0SbKqvtA56o/wzbM/4b/M3u5oHNJGlfHOzjdruLmi8+pphxSTvfavhhbiIUun H+ivC0opDOl7fU3KeHDMBxq9RNMCxHqt7EOdRJg/td3IegdQC003wmNpQJxvwZedOM fGtr/ak8wOR9Q== In-Reply-To: <86r0cefb0i.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 946a774fbeff10bbbaf7143145506277fb431cc5 Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 30 Jun 2024 22:19:07 -0400 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:320991 Archived-At: On Sunday, June 30th, 2024 at 20:09, Eli Zaretskii wrote: > > Date: Sun, 30 Jun 2024 19:25:36 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: Eli Zaretskii eliz@gnu.org, gerd.moellmann@gmail.com, yantar92@post= eo.net, > > emacs-devel@gnu.org > >=20 > > IIUC the consensus is you can set an "int" or "bool" to true, or write = to a self-pipe, but that's about as much as you should ever do in a signal = handler... >=20 > That's not true, AFAIU: you can safely call any of the dozens of > functions listed by the signal-safety(7) man page. I think the implication is reversed there: functions that aren't on that ma= n page definitely aren't safe to call, but that doesn't mean that any old C= code modifying complicated structures using only the listed functions is s= afe, at all. My point is that complicated C structures, such as the queue Helmut impleme= nted, cannot usually be safely modified from signal handlers unless the non= -signal code takes care to block signals while it is modifying the structur= e. All that said, it's not like our existing code looks safe, either, so the p= atch is definitely an improvement! Pip