From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Mon, 21 Dec 2015 22:53:44 -0800 Message-ID: <5678F378.3090906@dancol.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> <5678D710.9010406@dancol.org> <5678E8FE.1010502@cs.ucla.edu> <5678EA4E.6080606@dancol.org> <5678EEA3.2060402@cs.ucla.edu> <5678EF14.6010707@dancol.org> <5678F167.2040607@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4HSo3HGBjTAsQuX2jmcTQOixE2QUoPsNT" X-Trace: ger.gmane.org 1450767264 31569 80.91.229.3 (22 Dec 2015 06:54:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2015 06:54:24 +0000 (UTC) Cc: aurelien.aptel+emacs@gmail.com, p.stephani2@gmail.com, tzz@lifelogs.com, emacs-devel@gnu.org To: Paul Eggert , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 22 07:54:15 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 1aBGpq-0003uJ-LY for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 07:54:14 +0100 Original-Received: from localhost ([::1]:49001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGpq-0008Le-0s for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 01:54:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGpW-0008LM-TV for emacs-devel@gnu.org; Tue, 22 Dec 2015 01:53:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBGpS-0005eT-S0 for emacs-devel@gnu.org; Tue, 22 Dec 2015 01:53:54 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:55525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGpS-0005eI-JT; Tue, 22 Dec 2015 01:53:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=KEBlK7Y0E2u8uf+xbxxiUBtfcZ1MnE+6SM9LPHesxdg=; b=rGttLX34Ljf2ROiOuNVisNjA6sqQuUrpDJqC87+ma/neTFSvpyRHgbd7531U7hBOy5nB03V9l22VJAuQIXc5AzCnJli0wler4B+Ml1JNKSlnPF8FLIuFPHMbtS0AwIB9aCztJUCvo0BZPUrvwCGWncBokbzVD/xlSo0E1EPseCb4kjBOruz3Zih1eczIEmIwb9i4aWj/LThYi27Fw0ZScW+GSY0XTanvsA75bC81M8ZBFYXjiDXwD/kXZPNje72cNcE+uNipXY1W3UNuYG0gmtMbf+HLosFGIHJiwCr/vlls2/9PuapSUC+LgJKWc0WHM7xPLIEXUYBGFumWiFaVmQ==; Original-Received: from c-67-161-115-4.hsd1.wa.comcast.net ([67.161.115.4] helo=[192.168.1.210]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aBGpQ-0004X4-TA; Mon, 21 Dec 2015 22:53:48 -0800 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <5678F167.2040607@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:196657 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4HSo3HGBjTAsQuX2jmcTQOixE2QUoPsNT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/21/2015 10:44 PM, Paul Eggert wrote: > Daniel Colascione wrote: >> It's programmable in Lisp. Lisp stack overflows shouldn't kill Emacs. >> I'm suggesting that we shouldn't care about *C* stack overflows. >=20 > The Lisp stack *is* the C stack. There is just one stack, which can > overflow in module code or in Elisp interpreter code (or in library cod= e > or whatever). Whatever technique is used to detect Lisp stack overflows= , > should be usable to detect stack overflows in module calls. It's true that we have a unified stack, but that doesn't mean we have to treat both Lisp and C stack frames identically. My chief problem with the current stack overflow detection is that it's completely asynchronous: we can longjmp on *any* stack enlargement, even in the middle of a sequence of operations that can't normally be interrupted. A much more limited approach, where we probe the stack in Feval and longjmp only in safe positions, but would work as well for lisp, but would prevent our trying to recover from inherently unrecoverable situations. But why bother? We have max-lisp-eval-depth to prevent runaway recursion. Whenever I've written clowny overly-deep code, I've always hit that limit, or max-specpdl-size, first. --4HSo3HGBjTAsQuX2jmcTQOixE2QUoPsNT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWePN4AAoJEN4WImmbpWBlhQEQAImWryxEpzSMquySpSqWl8Xw 1oWSeK2REBSWJhPFV6VmGLdEkR7+p/Oim8yi+AF/Cp5s2+VyYubAL4EIbS4MADpv 8rpQ2loUvHA5pUEKrohYeF5jlsNrNUdlr5y4nSBzQEH/zxmbt0GDVGjWgncDvpY2 1dXy7k9VWJRIWRvJmRInGo7aQSnABmm8kOO8m/nxYA2Lo1XGxuG7MoUxjpXmm37y F++6AgM94C+Q3pSU2JZCLfMd8cPhFxFmgjDu1EyrjdGelHOJ7hdeB/pBTWplPYrp k2AOLnJrpW8XTGAKs+9oNkCb5eIxcFdB+fwibxFTLKUIFfz0YZ5Hl35GuLc+ybO/ bS7o9I2GskXnbWIzYu1e3tt2mt5Go4GQskkG7ZXY9inJLDhALyTCYMTXWPB9xmnR 1Gli9Iu4CsETJ+mg4sPNRjd2SFHShbH45o4Vz8Eha6pl+0fTTaDp1JayDQ2kd/Ln 99d8/n0WzIH+TciQmjUy9ZSZrlFe8H7mIQQGYBm+TC34KvALln7I/AXqcn6ZX1Kk /vajAHTlDKbJsGZdl7Fkcwo9zaRxc0RVHuvw5mEo/8Fi0G2EiAPxXRxJbLMoQnd4 aTsNBhfRSZFNgyNaM+KEGLyAjTeoN3PQAtaQESsUrfcrx0AUP1+uw4bc8UDVPJc6 a3IvisiNzNUbsGxN4X4O =GKuS -----END PGP SIGNATURE----- --4HSo3HGBjTAsQuX2jmcTQOixE2QUoPsNT--