emacs-devel
[Top][All Lists]
Advanced

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

Re: Dynamic loading progress


From: Philipp Stephani
Subject: Re: Dynamic loading progress
Date: Mon, 28 Sep 2015 15:19:09 +0000



Stephen J. Turnbull <address@hidden> schrieb am Mo., 14. Sep. 2015 um 05:43 Uhr:
Daniel Colascione writes:
 > On 09/13/2015 01:31 PM, Stefan Monnier wrote:

 > >> It's not possible to skip frames in module code using longjmp, so
 > >
 > > Why not?
 >
 > Because most C code isn't expecting to be unwound. Forcing non-local
 > flow control on module code is completely unacceptable.

"Completely unacceptable" is nonsense.  Module code needs to be
written the same way any other Emacs code is written,

Why? The module interface defines an interface, not an implementation strategy. The observable behavior of Emacs is described in the Emacs manual, and that contains nothing about longjmp (unsurprisingly, given that it's an implementation detail).
 
using various
unwind-protect constructs.

It is not possible to write such constructs in general. Stack frames that don't originate from C programs simply can't be part of a non-local jump. unwind-protect doesn't help at all because it doesn't stop non-local jumps.
 
 

And I'm sure that there's non-robust code in libraries out there that
will be totally horked on a non-local exit.  But AFAICS you have the
same problem there if you link statically or at Emacs initialization
-- that code just shouldn't be linked into Emacs period.



Such a decision would massively reduce the usefulness of modules. It would prevent dynamic modules in any language other than C, and even for C modules implementors would need to be careful not to write longjmp-hosting code. This is indeed unacceptable. 

reply via email to

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