emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc.


From: Philipp Stephani
Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc.
Date: Thu, 31 Mar 2016 18:44:42 +0000



Paul Eggert <address@hidden> schrieb am Mi., 2. März 2016 um 19:54 Uhr:
On 03/01/2016 01:43 PM, Philipp Stephani wrote:
>
>
>     https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00871.html
>
>
> I think this patch can still be applied as-is, it just simplifies the
> code a bit without changing any behavior.

OK, thanks, I applied it to master, along with the attached followup
which cleans things up a bit more and removes unnecessary runtime checks.

Thanks. Why did you remove the checks? I think all of them are necessary and lead to undefined behavior if they are violated.
 

>
>
>     https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00881.html
>
>     https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00902.html
>
>
> The second one is newer, so the first one should be discarded in favor
> of the second one. Given the decision to allow longjmp on segfault, it
> is no longer correct, but a variant (replacing "non-local exits" with
> "non-local exits due to Lisp `signal' and `throw'") should still be
> correct and useful.

This one looks more dubious. As I mentioned in the containing thread,
the comments are somewhat distracting where they are. Perhaps they could
be collected together into a comment in emacs-module.c that summarizes
the assumptions it makes.


The issue with that approach is that if one of the used functions is changed to throw signals, then the change author might not know to update emacs-module.c. In the worst case, for every function that starts throwing signals emacs-module.c would have to be investigated. It's less fragile to document the requirements in the functions themselves.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]