From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: emacs-module.c and signaling errors Date: Thu, 26 Nov 2015 14:28:34 -0500 Message-ID: References: <83k2p7xk13.fsf@gnu.org> <87wpt7p369.fsf@tromey.com> <83d1uzxgvw.fsf@gnu.org> <5654D7CF.90001@cs.ucla.edu> <87si3vox7j.fsf@tromey.com> <56555B52.3030703@cs.ucla.edu> <837fl6xa02.fsf@gnu.org> <5655F10D.9080805@cs.ucla.edu> <83vb8ovkc5.fsf@gnu.org> <83a8q0vgb9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448566144 826 80.91.229.3 (26 Nov 2015 19:29:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2015 19:29:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 26 20:28:53 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 1a22Dr-0007sc-5N for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 20:28:51 +0100 Original-Received: from localhost ([::1]:52907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22Ds-0002EA-Tb for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 14:28:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22Dh-0002E2-DB for emacs-devel@gnu.org; Thu, 26 Nov 2015 14:28:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a22Dc-0004HV-Fv for emacs-devel@gnu.org; Thu, 26 Nov 2015 14:28:41 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:51968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a22Dc-0004HL-BC; Thu, 26 Nov 2015 14:28:36 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id tAQJSYJf016597; Thu, 26 Nov 2015 14:28:34 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id A000CAE06E; Thu, 26 Nov 2015 14:28:34 -0500 (EST) In-Reply-To: <83a8q0vgb9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Nov 2015 19:08:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5502=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5502> : inlines <4038> : streams <1544546> : uri <2090126> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:195311 Archived-At: > What happens now is that modules can call Lisp only via env->funcall, > which _will_ catch the signal. When the signal is caught, its data is > recorded. All the other API calls made by the module function on > whose watch the signal happened will do nothing, and eventually the > module function will return to module-call, which will re-throw the > signal with exactly the same data. > Why is that a problem? Because this loses the connection between the signal and its origin. Because it imposes a cost which we may not want to pay. The current "funcall" should be renamed to "safe_funcall", and a new "funcall" should be provided which does not catch signals. Stefan