unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tom@tromey.com, tzz@lifelogs.com, emacs-devel@gnu.org,
	eggert@cs.ucla.edu, aurelien.aptel+emacs@gmail.com,
	dancol@dancol.org
Subject: Re: Dynamic modules: emacs-module.c and signaling errors
Date: Wed, 25 Nov 2015 21:52:20 +0000	[thread overview]
Message-ID: <CAArVCkS0kM4HKmOqC=hnYLPU=RiG_E97gtfeH7boQdWUAgSb=A@mail.gmail.com> (raw)
In-Reply-To: <83io4px4x9.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Mi., 25. Nov. 2015 um 20:19 Uhr:

> > - Ignore unhandled errors, proceed as if no error happened. This would be
> > consistent with popular C APIs such a the C standard library itself and
> POSIX.
> > - The current approach: crash if checking is enabled, ignore otherwise.
>
> The simple patch I sent a few minutes ago, according to Tom's
> suggestion, should cause such errors to signal a Lisp error from
> module-call.  I think this is what we should do.
>

Yes, I think that's better than crashing, longjmping, and also the current
approach. Ignoring unhandled errors would indeed have the potential to
swallow errors, unless we saturate the error state (i.e. never set it to
successful except in clear_error). So now I think that your patch indeed is
the best solution.

Maybe we should further reduce the amount of undefined behavior. Currently
e.g. passing null pointers is undefined behavior that will typically crash
Emacs. We could make this more robust by signaling an error instead; the
overhead should be minimal.

[-- Attachment #2: Type: text/html, Size: 1391 bytes --]

  reply	other threads:[~2015-11-25 21:52 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 19:41 Dynamic modules: emacs-module.c and signaling errors Eli Zaretskii
2015-11-24 19:45 ` Eli Zaretskii
2015-11-24 20:12 ` Tom Tromey
2015-11-24 20:49   ` Eli Zaretskii
2015-11-24 21:34     ` Paul Eggert
2015-11-24 21:55       ` Daniel Colascione
2015-11-25  6:52         ` Paul Eggert
2015-11-25  7:03           ` Daniel Colascione
2015-11-25  7:14             ` Paul Eggert
2015-11-25  7:18               ` Daniel Colascione
2015-11-25  7:23                 ` Paul Eggert
2015-11-25  7:25                   ` Daniel Colascione
2015-11-25  7:49                     ` Paul Eggert
2015-11-25  7:52                       ` Daniel Colascione
2015-11-25  7:58                         ` Paul Eggert
2015-11-25  8:12                           ` Daniel Colascione
2015-11-25  8:24                             ` Paul Eggert
2015-11-25  8:50                               ` Daniel Colascione
2015-11-25  9:11                                 ` Daniel Colascione
2015-11-25 18:19                                   ` Eli Zaretskii
2015-11-25 18:26                                   ` Philipp Stephani
2015-11-25 19:19                                     ` Eli Zaretskii
2015-11-25 21:52                                       ` Philipp Stephani [this message]
2015-11-25 17:34                                 ` Paul Eggert
2015-11-24 22:21       ` Tom Tromey
2015-11-25  6:55         ` Paul Eggert
2015-11-25 17:30           ` Eli Zaretskii
2015-11-25 17:34             ` Paul Eggert
2015-11-25 21:23               ` Stefan Monnier
2015-11-26 15:42                 ` Eli Zaretskii
2015-11-26 16:36                   ` Stefan Monnier
2015-11-26 17:08                     ` Eli Zaretskii
2015-11-26 19:28                       ` Stefan Monnier
2015-11-26 19:34                         ` Eli Zaretskii
2015-11-26 20:11                           ` Stefan Monnier
2015-11-26 20:19                             ` Eli Zaretskii
2015-11-26 21:20                               ` Paul Eggert
2015-11-26 22:29                                 ` Philipp Stephani
2015-11-26 22:33                                   ` Philipp Stephani
2015-11-27  1:06                                   ` Stefan Monnier
2015-11-27  1:10                                     ` Daniel Colascione
2015-11-27 15:06                                       ` Stefan Monnier
2015-11-27  8:12                                     ` Eli Zaretskii
2015-11-27  9:11                                 ` Eli Zaretskii
2015-11-27 12:25                                   ` Aurélien Aptel
2015-11-27 14:44                                     ` Eli Zaretskii
2015-11-28 23:31                                     ` Paul Eggert
2015-11-27  1:21                               ` Stefan Monnier
2015-11-27  8:26                                 ` Eli Zaretskii
2015-11-27 15:15                                   ` Stefan Monnier
2015-11-27 15:57                                     ` Eli Zaretskii
2015-11-27 16:29                                       ` Stefan Monnier
2015-11-27 17:38                                         ` Eli Zaretskii
2015-11-27 17:54                                           ` Stefan Monnier
2015-11-25 18:10           ` Tom Tromey
2015-11-25 18:15         ` Eli Zaretskii
2015-11-25 18:09 ` Philipp Stephani
2015-11-25 21:19   ` Stefan Monnier
2015-11-26 15:41     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkS0kM4HKmOqC=hnYLPU=RiG_E97gtfeH7boQdWUAgSb=A@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=aurelien.aptel+emacs@gmail.com \
    --cc=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tom@tromey.com \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).