From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Sun, 03 Jan 2016 12:25:24 -0800 Message-ID: References: <83mvu1x6t3.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> <83mvt2qxm1.fsf@gnu.org> <56797CD9.8010706@cs.ucla.edu> <8337uuqsux.fsf@gnu.org> <5679DC83.70405@cs.ucla.edu> <83oadhp2mj.fsf@gnu.org> <567AD556.6020202@cs.ucla.edu> <567AD766.3060608@dancol.org> <567B5DAB.2000900@cs.ucla.edu> <83fuyromig.fsf@gnu.org> <567C25B1.3020101@dancol.org> <56892FD6.8040708@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1451852759 4550 80.91.229.3 (3 Jan 2016 20:25:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 20:25:59 +0000 (UTC) Cc: Eli Zaretskii , Paul Eggert , Emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 03 21:25:52 2016 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 1aFpDq-0007Wl-Ey for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 21:25:50 +0100 Original-Received: from localhost ([::1]:42823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFpDp-0005zH-Eg for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 15:25:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFpDc-0005yv-F9 for Emacs-devel@gnu.org; Sun, 03 Jan 2016 15:25:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFpDZ-00077C-90 for Emacs-devel@gnu.org; Sun, 03 Jan 2016 15:25:36 -0500 Original-Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:34745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFpDZ-000778-2q; Sun, 03 Jan 2016 15:25:33 -0500 Original-Received: by mail-pa0-x230.google.com with SMTP id uo6so166050446pac.1; Sun, 03 Jan 2016 12:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version:content-type; bh=DEV2DcUZRgN0yc8TMZAqyvtewrbOdhgiN1t6iaX7w6I=; b=0SDUOMHjygOE0A5OQF+9yQqd/PR3fYpfZCYZ7UZm+VoFfkCeZw8G1EPnMt+GXaawcg YGxiiLU4RmJLtpfpxNsEsoJHtXWhEUod9FN9uM4BaBeVizdJIhJaHriCG1lXY3vWc5ns Awb2Pa5/ysfH5R8K0u+OoljCRu1vfltX1nzZ+b9NP/fQaNk1lcLwX58LosayzxZedxo7 LCpXFglxdXKLMd+m/Y3mGyn8wIf3gELDtexIOx/RQ5w79KmH6RikSjAc+yZuGD4mHiXX xraCYUZO/bcmLrWn+j/w605H5uhTsFUt+xzxUoSS4fmo4JNpJ2uBkPzmRkawQzRbSE4c ndiQ== X-Received: by 10.66.192.42 with SMTP id hd10mr119854752pac.111.1451852732438; Sun, 03 Jan 2016 12:25:32 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id sv8sm120960929pab.13.2016.01.03.12.25.30 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 03 Jan 2016 12:25:31 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 4F50D12000636; Sun, 3 Jan 2016 12:25:30 -0800 (PST) In-Reply-To: <56892FD6.8040708@dancol.org> (Daniel Colascione's message of "Sun, 3 Jan 2016 06:27:34 -0800") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Daniel Colascione , Eli Zaretskii , Paul Eggert , Emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::230 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:197499 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Daniel Colascione writes: > In practice, the Lisp stack depth limits provide enough protection, and t= he > risk of data corruption is too great. The existing auto-save logic is good > enough for data recovery, especially if we run the sigsegv handler on the > alternate signal stack (which we can make as large as we want) when > possible. OK, I see we have two roads, and I see where your objection is coming from. You say, "In practice". Can you expound on your practical experience? I'm curious if there's a real experience you've had that leads to such a strong objection. Also, note that other cases of error recovery leading to undefined behavior exist in the wild: If a process uses too much memory, Linux's OOM killer wi= ll terminate arbitrary processes in an attempt to prevent system lockup. There are no guarantees that it will not kill something that leaves the system in= an inconsistent or bad state, since the process it kills may have been in the middle of a critical process, and the author might not have written proper signal handlers. I'm inclined to leave the stack overflow protection in until it bites us; because I know from personal evidence that having Emacs suddenly disappear DOES bite people. I'm less sure about "undefined behavior" that I haven't experienced yet... =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGcBAEBCgAGBQJWiYO0AAoJEMFE2PTxn+YwS54MAIK/TpnduYfmasEVOGjDetXB 5u37vwKTdyvppUpWvf3KbwhO+6Jb5yeFYLMRd3uNGDax9MvsT3EWCbqwVke1uHat OYVyN/zJ32cAaly/8MEaPFXMt7w4ZUFpCQjKdX5FFvmP58i5ZRA5hUEfGulUluYN giRqjtNFAQ5oEd2V/EQ4dpWOvHvOW6kACnR7xRpof7PuHclddEtcvI25Lu9gMlWy lqdmnurO1331CH6z6ddxEJQFYw0RR94PNA/Iy1raA+EF6xxsWyVC0v1w1WUuqzS8 K7ByycQcIRDpsurA5T1Z6O/t7aAM1uvVGFrs96tFghscHUC0BYjUoD8gO7VG3uXp Wq9pK8fdXqT0mN+lgLdfH39oGgBoWU7FbuCoJHz1jvlG7SAyuyvbsLQxiooAMvXk 50w9KEkc0obC4LqDEoVakDT/IQsD+cwUMKOKj9QqP26NBNfmZSmKymk2CUvfblT0 bXvMtqN7v5x1Jz0EhhuNhi4JoPpRJdWHDY60y6ZqAQ== =MvpP -----END PGP SIGNATURE----- --=-=-=--