[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSO-style FFI
From: |
Stephen J. Turnbull |
Subject: |
Re: DSO-style FFI |
Date: |
Wed, 09 Oct 2013 10:48:54 +0900 |
Tom Tromey writes:
> I don't understand why it is preferable to a libffi-based FFI.
Offering dynamic loading only preserves the safety of the Lisp
language itself, modulo bugs in the called C code. An FFI done simply
will make it possible to write buggy Lisp code that crashes non-buggy
Emacs and/or non-buggy external libraries. Doing the FFI right is
very finicky and probably depends on the internals of libffi and
Emacs. As Ralph Nader put it, "unsafe at any speed".
> The main difficulty I see is that now you're either promising an
> internal Emacs ABI -- hard to do
Just for the subr calls. Modules aren't allowed to call ordinary
functions from Emacs, just DEFUNs.
> -- or you're requiring recompilations whenever Emacs changes --
> hard on users.
Perhaps. Worry about this, and the complete lack of demand from
non-developer users, is why XEmacs has never made DSOs part of the
package system.
> Stefan> One issue will be compatibility of various kinds of dl_open
> Stefan> mechanisms on various OSes, but you should find lots of help for
> Stefan> that here, so the first version can focus on supporting only
> Stefan> GNU/Linux.
>
> GNU already has libltdl.
I forget which one it is, but one of the dlopen mechanisms now works
on recent versions of all platforms XEmacs supports (I think even
native Windows).
- Re: DSO-style FFI, (continued)
- Re: DSO-style FFI, Tom Tromey, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/08
- Re: DSO-style FFI, Tom Tromey, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style FFI, Andreas Schwab, 2013/10/10
- Re: DSO-style FFI, Davis Herring, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style FFI, Davis Herring, 2013/10/09
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style DSOs (this is NOT an FFI!), Stephen J. Turnbull, 2013/10/10
- Re: DSO-style FFI,
Stephen J. Turnbull <=
- Re: DSO-style FFI, Stefan Monnier, 2013/10/08
- Re: DSO-style FFI, Michael Welsh Duggan, 2013/10/12
- Re: DSO-style FFI, Stephen J. Turnbull, 2013/10/12
- Re: DSO-style FFI, Stefan Monnier, 2013/10/14
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/18
- Re: DSO-style FFI, Stefan Monnier, 2013/10/19
- Re: DSO-style FFI, Stefan Monnier, 2013/10/19
- Re: DSO-style FFI, Andy Moreton, 2013/10/19
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/19
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/08