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:14:38 -0800 Message-ID: <5678EA4E.6080606@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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BnWRmpEaKHH96oobs0FitSBctHqo7Onfd" X-Trace: ger.gmane.org 1450764897 30232 80.91.229.3 (22 Dec 2015 06:14:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2015 06:14:57 +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:14:52 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 1aBGDj-0003CO-Kt for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 07:14:51 +0100 Original-Received: from localhost ([::1]:48890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGDi-0006Fx-Ll for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 01:14:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGDf-0006Fr-Ew for emacs-devel@gnu.org; Tue, 22 Dec 2015 01:14:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBGDe-00056B-EI for emacs-devel@gnu.org; Tue, 22 Dec 2015 01:14:47 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:55279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBGDe-00055H-69; Tue, 22 Dec 2015 01:14:46 -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=oUvOtz2LGsbZGx9udBtNX48kvOXN71nXzVmFzCnrRpc=; b=mRazutid5N5Iz+Si06cMhFtOpTVG8kaR8ojxnpj3m4v++RONh2CUKA9IK3uT8S0DFzE/lC5y+NrkEo/VjqWGtnxqYfbF2ck6jp0z4ifPAnD2VxdgOvJBsE2PirNAhYGu/GMzpaQYFlgXAp6ytZEcOU1SbCab6PnFDcp2UnrQZ1J0tKNwihwuFNDHsVqKrFYmncO7CQarK6A1ZVDsud93/r6wcDtQyrfhYMguNOFuNP8eOUjJhaDMBpcMyJVH+PwDhNYnGHfZYgcJ6NUuk0FK9r90GHuIbLV6pFsiSjwjFSyVKn0KLI+qllkFCSosNGC2uDfdCu6Z51c3MgS+ou/NPg==; Original-Received: from [2620:10d:c090:180::1:902d] (helo=[IPv6:2620:10d:c081:1103:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aBGDc-0004L8-Mx; Mon, 21 Dec 2015 22:14:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <5678E8FE.1010502@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:196653 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BnWRmpEaKHH96oobs0FitSBctHqo7Onfd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/21/2015 10:09 PM, Paul Eggert wrote: > Daniel Colascione wrote: >>> That would certainly be easier to implement! But as a user I would no= t >>> >find it acceptable. >> You find it acceptable in most other programs. >=20 > ?! No, I don't find it acceptable for any program to dump core on stac= k > overflow. Most programs you use don't bother trying to detect or recover from sack overflow. Why should they? C stack overflow is a programming error. It's like hitting an assertion failure. Should we try to recover from assertion failures too? > And even if it were OK for (say) 'cat' to dump core due to > stack overflow in a typical environment (which it's not), Emacs is more= > important than 'cat', because people use it as an interactive text > editor and do not want to lose their work. >=20 >> we already crash if we overflow the stack while we're GCing. >=20 > If so, that's a bug that should get fixed. It's not an excuse to > introduce similar bugs. >=20 > Really, the idea that it's OK for Emacs to crash is a nonstarter. Emacs= > should not crash. Ideally, we wouldn't have bugs. But we do, and when we hit them, we should crash reliably and deterministically if we can't recover reliably. The current stack overflow scheme can't recover reliably because it doesn't fix maintain invariants. There are ways to fix it --- e.g., we can make our own guard pages, mark them PROT_NONE, and on stack overflow, mark them PROT_READ | PROT_WRITE long enough to reach eval, *then* signal, but I don't think it's worth it. --BnWRmpEaKHH96oobs0FitSBctHqo7Onfd 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 iQIcBAEBCAAGBQJWeOpOAAoJEN4WImmbpWBl+rgP/RhKBUa41yb7skJQxyNvkUy3 0f9r4wNYK8ACizMFgjHX8DaXIqkYE7MxNcnMesrn9yVz+mwlgmMFQPTHg5NHGLvN dHI8pLd9ZEbsiYoN7leRpDfkt7Bt7APpRYprh1cWz7wFwptZMhra8sFeSX2KyWi0 XBkdGsh3rpaGsKFdz9+IZfpo+uRUGakNRY4tHNmt0khsdMuB4Exwc/YbNebgmAxU ftIZPsQR25fzoXBp9byRSygpfSti35gABIK0ztDV9K4e6aoI5ykihSvV9pezGMVa zTmhW/AZhzwgW3UD75jbjNBHo9tBy7tStxAcwyBZQiAJDFiTR9Y5F4ZRLExD1Y6H /RG9PH7MwpjtMBzEnXRPtT/ZVIMn2ur/LV6WsBz27e6TFtqhA7K9/6uLoVVd9UJ9 s4fLUv3C4Xkyc/x/QIXu59clGNQfoKtnWpskEvhU9z2XkFsI0ZDUt3VPk1FxUxw6 a2g5O//mneJL8Lr4rJM/vYKANP/+5uIHQxUQpo0X8tpwOe61DXqmxSBjAvgc/7LX UnNZusQIQNxXHZR48NJN7wWBX6VhyT9FMUrtn4GZgjSVp0DukpRfrKAmQPk6XPfx qDKUHd7j2ydO8ZGv2GnQLx69A+DSp/C8f2L/2NmdWNJXgWiaJmkeYQj+5PChjAR9 5t7dHVEwofslCCZZtx7B =KzjQ -----END PGP SIGNATURE----- --BnWRmpEaKHH96oobs0FitSBctHqo7Onfd--