From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Tue, 22 Dec 2015 18:03:34 +0200 Message-ID: <83mvt2qxm1.fsf@gnu.org> References: <83mvu1x6t3.fsf@gnu.org> <565779CD.80405@cs.ucla.edu> <83io4nuc68.fsf@gnu.org> <83r3iht93x.fsf@gnu.org> <838u4psznr.fsf@gnu.org> <56772054.8010401@cs.ucla.edu> <83zix4scgf.fsf@gnu.org> <5677DBC9.6030307@cs.ucla.edu> <83io3rst2r.fsf@gnu.org> <567841A6.4090408@cs.ucla.edu> <567844B9.2050308@dancol.org> <5678CD07.8080209@cs.ucla.edu> <5678D3AF.7030101@dancol.org> <5678D620.6070000@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1450800211 4314 80.91.229.3 (22 Dec 2015 16:03:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2015 16:03:31 +0000 (UTC) Cc: aurelien.aptel+emacs@gmail.com, p.stephani2@gmail.com, dancol@dancol.org, tzz@lifelogs.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 22 17:03:22 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aBPPF-0005t5-RC for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 17:03:21 +0100 Original-Received: from localhost ([::1]:51352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBPPF-0006iL-3c for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 11:03:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBPOy-0006gM-9E for emacs-devel@gnu.org; Tue, 22 Dec 2015 11:03:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBPOv-0002CV-3P for emacs-devel@gnu.org; Tue, 22 Dec 2015 11:03:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBPOv-0002CR-0M; Tue, 22 Dec 2015 11:03:01 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1542 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aBPOu-00080P-35; Tue, 22 Dec 2015 11:03:00 -0500 In-reply-to: <5678D620.6070000@cs.ucla.edu> (message from Paul Eggert on Mon, 21 Dec 2015 20:48:32 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196667 Archived-At: > Cc: aurelien.aptel+emacs@gmail.com, p.stephani2@gmail.com, tzz@lifelogs.com, > emacs-devel@gnu.org > From: Paul Eggert > Date: Mon, 21 Dec 2015 20:48:32 -0800 > > The only real change we have to make is to have Emacs longjmp not to > return_to_command_loop (which might skip module frames), but to longjmp > instead to the most deeply nested entry point from module code into > Emacs, which we can set up in advance whenever a module calls into the > Emacs API. > > Yes, that looks like something we should do, then, to get stack overflow checking working with modules. If that means letting modules run arbitrary stack unwinding code on the alternate stack, I'm against that. Doing so will significantly lower the chances for a successful recovery (which means at least letting the user safely save their work and exit the session).